bfs+优先队列(hdu1242)
摘要:
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1242这题目就是个大坑,先说下思路就是在遇到‘x’时要多停留1步,另外就是要用到优先队列,要从小到大排列,另外就是普通的bfs了但是要注意题里的each of Angel's friend数据里其实就一个‘r’的位置,但我当多个‘r’做应该也没错就是wa想不通啊这是我按一个‘r’做的。#include#include#include #include using namespace std;struct in{ char b; int x; int y; int t;... 阅读全文
posted @ 2013-12-03 17:46 Arthas0v0 阅读(152) 评论(0) 推荐(0) 编辑