subject

You are in a 3D labyrinth of Conflict Empire and you want to escape it. The labyrinth could be represented as a three dimensional array where every cell is either empty or filled by rock. In every minute, you can travel in any direction parallel to the edges of the labyrinth, i. e. north, south, east, west, up and down, by one cell. You are not allowed to step onto a rock cell nor allowed to travel out of the labyrinth without reaching the exit point. Given the starting point and the exit point, your task is to determine the minimum time needed to escape this labyrinth. Input
The first line of the input contains three integers K, N and M (1 <= K, N,M <= 30), indicating the number of layers, rows and columns of the labyrinth, respectively. Then there follows K blocks of N lines each containing M characters. Each character describes one cell of the labyrinth, where # indicates a cell of rock and indicates an empty cell. The starting position is indicated by S and the exit by E. S and E never overlap, they are always at distinct locations. There is always exactly one starting position and one exit position. There will be a single blank line after each level.
Output х is the minimum time needed to escape this labyrinth, or Print one line Escaped in x minute(s). where Trapped! if it is impossible to escape. Example 1 Input: 3 4 5 S .###. .##..##.## ##... #.### E Output: Escaped in 11 minute(s). Example 2 Input: 1 3 3 S## #E# ### Output: Trapped!

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 01:10, kristofwr3444
Are special combinations of keys that tell a computer to perform a command. keypads multi-keys combinations shortcuts
Answers: 1
image
Computers and Technology, 23.06.2019 10:20, chonawilson4
Suppose there is a relation r(a, b, c) with a b+-tree index with search keys (a, b).1. what is the worst-case cost of finding records satisfying 10 < a < 50 using this index, in terms of the number of records n1, retrieved and the height h of the tree? 2. what is the worst-case cost of finding records satisfying 10 < a < 50 and 5 < b < 10 using this index, in terms of the number of records n2 that satisfy this selection, as well as n1 and h defined above? 3. under what conditions on n1 and n2, would the index be an efficient way of finding records satisfying the condition from part (2)?
Answers: 1
image
Computers and Technology, 23.06.2019 17:00, chrisgaz14
The more powerful, 60 volt cables and the main power shut off on an hev are both colored orange
Answers: 1
image
Computers and Technology, 23.06.2019 22:00, bb1593
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
You know the right answer?
You are in a 3D labyrinth of Conflict Empire and you want to escape it. The labyrinth could be repre...

Questions in other subjects: