【每周一题】2017.4.17 HDU1010

题目描述

  • (我懒得翻译了,就是一个狗狗走迷宫问它在规定时间是否恰好能到达出口)
  • The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone was a trap, and he tried desperately to get out of this maze.
  • The maze was a rectangle with sizes N by M. There was a door in the maze. At the beginning, the door was closed and it would open at the T-th second for a short period of time (less than 1 second). Therefore the doggie had to arrive at the door on exactly the T-th second. In every second, he could move one block to one of the upper, lower, left and right neighboring blocks. Once he entered a block, the ground of this block would start to sink and disappear in the next second. He could not stay at one block for more than one second, nor could he move into a visited block. Can the poor doggie survive? Please help him.
  • 这道题考的是搜索哦,啧啧啧,还是一个需要剪枝的搜索。快点打开IDE吧!
  • 可以把代码提交至这里:http://acm.hdu.edu.cn/showproblem.php?pid=1010

你可能感兴趣的:(【每周一题】2017.4.17 HDU1010)