[kuangbin带你飞]专题一 简单搜索 B - Dungeon Master poj2251
来源:互联网 发布:管理权限的软件 编辑:程序博客网 时间:2024/05/29 17:58
B - Dungeon Master
Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uAppoint description:
Description
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?
Is an escape possible? If yes, how long will it take?
Input
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
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.
Output
Each maze generates one line of output. If it is possible to reach the exit, print a line of the form
where x is replaced by the shortest time it takes to escape.
If it is not possible to escape, print the line
Escaped in x minute(s).
where x is replaced by the shortest time it takes to escape.
If it is not possible to escape, print the line
Trapped!
Sample Input
3 4 5S.....###..##..###.#############.####...###########.#######E1 3 3S###E####0 0 0
Sample Output
Escaped in 11 minute(s).Trapped!
题意
给你一个 L层 R行 C列 的地牢,你要从S 到 E(出口)出去,
问你最短时间是多少 如果不能输出Trapped!
以前
现在
0 0
- [kuangbin带你飞]专题一 简单搜索 B - Dungeon Master poj2251
- [kuangbin带你飞]专题一 简单搜索 B POJ2251
- Dungeon Master([kuangbin带你飞]专题一 简单搜索)
- [kuangbin带你飞]专题一 简单搜索 B - Dungeon Master(POJ 2251)
- [kuangbin带你飞]专题一 简单搜索->B - Dungeon Master
- [kuangbin带你飞]专题一 简单搜索 - B - Dungeon Master
- POJ 2251 Dungeon Master (kuangbin带你飞 专题一:简单搜索)
- [kuangbin带你飞]专题一 简单搜索 Dungeon Master : BFS
- POJ2251 Dungeon Master kuangbin-搜索入门-B
- [kuangbin带你飞]专题一 简单搜索 B
- [kuangbin带你飞]专题一 简单搜索-B
- 2251&[kuangbin带你飞]专题一 简单搜索 B
- [kuangbin带你飞]专题一 简单搜索 B
- [kuangbin带你飞]专题1 简单搜索 B
- kuangbin带你飞专题一(搜索)B
- [kuangbin神带你飞]专题一 简单搜索
- kuangbin带你飞 专题一 简单搜索 (题解)
- Fire Game [kuangbin带你飞]专题一 简单搜索
- CSS Hack代码与浏览兼容总结
- 用Python读取大文件(上)
- linux64 rh7 下安装oracle11g(r2)
- 自学Python第一周——print的用法总结
- 隐语义模型LFM
- [kuangbin带你飞]专题一 简单搜索 B - Dungeon Master poj2251
- 回调函数
- C/C++ debug(一)
- java 注解
- nyoj 364 田忌赛马
- http协议解析
- PostgreSQL学习手册(客户端命令<一>)
- ContentProvider访问通讯录
- How to Run a Custom Shell Script During an XCODE Build