当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

3582:A Puzzle Game

题目描述
Tower of the Sorcerer is a cross between a puzzle game and an RPG.
The story is saving the princess who was locked in the magic tower; it is the such story as you have heard the other day. But the fact is that this story isn't related to this game at all. Why? You will know the reason when you play this game. As the content of this is RPG, there is the side like a puzzle. Please play this without hurry combining with training of brain.

To save the princess you must go up the floors. You fight the bad guys and get keys to open doors. You have a health meter and you can gold coins and experience to increase defensive power, offensive power, and health. The levels are not randomly generated so the game will be the same every time you play.
Is it a complex game? Let’s take it easy. Imagining that you have met the princess and gone back to ground floor, your mission is going to the destination position of the maze on ground floor. This is a two-dimensional maze composed of square cells which may or may not be filled with rock. You can move north, south, east or west one cell at a step. You can move north, south, east or west one cell at a step. There are some locked doors (the number of them not more than 10). Maybe you could open some of them to go to the destination place. Luckily, many keys are hidden in the maze. These keys can open any doors, but each of them can be only used once.
输入解释
The first line of input contains a single positive integer. This is the number of mazes that follow. Each maze description starts with a line containing one integer r (r <= 10) representing the number of rows of the maze. The number of columns equals the number of rows of the maze
Following this are r lines each containing r characters. Each character describes one cell of the maze. A cell full of rock is indicated by a '*' and an empty cell is represented by a '.'. Your starting position is symbolized by 'S', the destination position by 'E', the position where is hidden a key by 'K' and the position of the locked door by 'L'.
输出解释
For each maze in the input, first print the number of the maze, as shown in the sample output. Then, if it is possible to go to the destination position, print "Yes". Otherwise, output "No"
输入样例
3
2
*E
*S
2
*E
S* 
3
E..
**L
SK.
输出样例
Case 1: Yes
Case 2: No
Case 3: Yes
来自杭电HDUOJ的附加信息
Author shackler (Special Thanks: Louty)
Recommend zhouzeyong

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-3582

最后修改于 2020-10-25T23:04:58+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)