
BFS
HPU2_2
这个作者很懒,什么都没留下…
展开
-
Rescue
Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M <= 200) matrix. There are WALLs, ROADs, and GUARDs in the prison. Angel’s friends want t...原创 2018-07-31 22:09:32 · 254 阅读 · 0 评论 -
Battle City
Many of us had played the game “Battle city” in our childhood, and some people (like me) even often play it on computer now. What we are discussing is a simple edition of this game. Given a map that...原创 2018-07-31 22:12:46 · 229 阅读 · 0 评论 -
Catch That Cow
农夫知道一头牛的位置,想要抓住它。农夫和牛都于数轴上 ,农夫起始位于点 N(0<=N<=100000) ,牛位于点 K(0<=K<=100000) 。农夫有两种移动方式: 1、从 X移动到 X-1或X+1 ,每次移动花费一分钟 2、从 X移动到 2*X ,每次移动花费一分钟 假设牛没有意识到农夫的行动,站在原地不。最少要花多少时间才能抓住牛? Input 一行: 以空格...原创 2018-07-31 22:15:44 · 5593 阅读 · 0 评论 -
Robot Motion
A robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are N north (up the pa...原创 2018-07-31 22:22:53 · 239 阅读 · 0 评论