摘要:
分别从s,e出发进行bfs注意讨论的部分即可。详见代码:View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #include<queue> 5 #include<map> 6 #include<algorithm> 7 using namespace std; 8 const int maxn = 8; 9 const int inf = 123456789; 10 struct node{ 11 int x,y; 12 }; 阅读全文
posted @ 2013-02-14 23:02
xxx0624
阅读(253)
评论(0)
推荐(0)
摘要:
题意:有上一状态到下一状态单向bfs就是每次只改变一个点的一个方向!!!( 参考。。。http://blog.csdn.net/cscj2010/article/details/7371482)View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<stdlib.h> 4 #include<queue> 5 #include<algorithm> 6 using namespace std; 7 const int maxn = 8; 8 bool vis[ maxn 阅读全文
posted @ 2013-02-14 21:36
xxx0624
阅读(345)
评论(0)
推荐(0)

浙公网安备 33010602011771号