2014年4月25日

HDU1242 Rescue 简单bfs

摘要: 求最小步数 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 char map[211][211]; 8 struct node 9 {10 int x,y,st... 阅读全文

posted @ 2014-04-25 10:52 >_< 阅读(140) 评论(0) 推荐(0) 编辑

HDU1026 Ignatius and the Princess I bfs(需要记录路径)

摘要: 一开始用递归显示路径会爆栈,后来用数组road[]保存路径就过了 1 #include 2 #include 3 #include 4 using namespace std; 5 int n,m; 6 char map[110][110],hp[110][110],flag[110][110]; ... 阅读全文

posted @ 2014-04-25 10:45 >_< 阅读(146) 评论(0) 推荐(0) 编辑

导航