1.26号英语翻译

题目来源:http://noi.openjudge.cn/ch0205/1253/

重点词汇:

Dungeon:n.地牢

compose: v.组成;

letter :n.字母,信;

character:n.字符,人物,性格;

terminate:adj.临界的,有限的;

1253:Dungeon Master

  地下城主

总时间限制: 
1000ms
 
内存限制: 
65536kB
描述
You are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move one unit north, south, east, west, up or down. You cannot move diagonally and the maze is surrounded by solid rock on all sides.
Is an escape possible? If yes, how long will it take?
你被困在一个3D牢房里,需要找出一条最快的路跑出去。这个地牢由单位立方体组成,可能会或可能不会充满岩石。向北,向南,向东,向西,向上,向下移动一个单元需要一分钟。你不能沿对角线移动,并且迷宫的四周都是坚固的岩石。
是否具有逃出的可能?如果有,需要多长的时间?
输入
The input consists of a number of dungeons. Each dungeon description starts with a line containing three integers L, R and C (all limited to 30 in size).
L is the number of levels making up the dungeon.
R and C are the number of rows and columns making up the plan of each level.
Then there will follow L blocks of R lines each containing C characters. Each character describes one cell of the dungeon. A cell full of rock is indicated by a '#' and empty cells are represented by a '.'. Your starting position is indicated by 'S' and the exit by the letter 'E'. There's a single blank line after each level. Input is terminated by three zeroes for L, R and C.
输入包括地牢的数量。每一个地牢的描述都以包含三个整数 L、R 和 C(均限制为 30 大小)的行开头。
L 是构成地牢的关卡数。
R 和 C 是构成每个级别的计划的行数和列数。
然后将跟随 L 块 R 行,每行包含 C 个字符。每个字符描述地牢的一个单元格。 一个充满岩石的单元格用  “#” 表示,空的单元格用  “.”   表示。 您的起始位置用  “S”  表示,出口用字母  “E” 表示。 每个级别后都有一个空行。 输入以 L、R 和 C 的三个零终止。
输出
Each maze generates one line of output. If it is possible to reach the exit, print a line of the form
Escaped in x minute(s).
每一个迷宫产生一行输出。如果可以到达出口,打印一行表格
逃离的时间(s)
where x is replaced by the shortest time it takes to escape.
If it is not possible to escape, print the line
Trapped!

其中 x 被替换为逃生所需的最短时间。
如果无法逃脱,则打印该行

被困了!(呜~~)
样例输入
3 4 5
S....
.###.
.##..
###.#

#####
#####
##.##
##...

#####
#####
#.###
####E

1 3 3
S##
#E#
###

0 0 0
样例输出
Escaped in 11 minute(s).
Trapped!
来源
Ulm Local 1997
上一篇:Airtest 指定点击页面中相同的按键


下一篇:CodeForces 191C Fools and Roads