摘要: 题意:在n×m的地图上,0表示墙,1表示空地,2表示人,3表示目的地,4表示有定时炸弹重启器。定时炸弹的时间是6,人走一步所需要的时间是1。每次可以上、下、左、右移动一格。当人走到4时如果炸弹的时间不是0,可以重新设定炸弹的时间为6。如果人走到3而炸弹的时间不为0时,成功走出。求人从2走到3的最短时... 阅读全文
posted @ 2015-05-20 22:54 __Meng 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 给出起点 终点 以及转弯次数 在 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int n , m , k; 8 int sx , sy ,ex , ey ; 9 char map[110][110] ;10 boo... 阅读全文
posted @ 2015-05-20 20:34 __Meng 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 在横坐标上 从n点走到k点 至少要几步 可以到 n+1 n-1 n*2这3个点Sample Input5 17 Sample Output4 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 int... 阅读全文
posted @ 2015-05-20 13:03 __Meng 阅读(290) 评论(0) 推荐(0) 编辑