摘要: http://poj.org/problem?id=1606 1 #include 2 #include 3 #define MAXN 1000000 4 using namespace std; 5 6 int c,d,e,ans,l; 7 bool vis[1001][1001]; 8 struct node 9 { 10 int a,b; 11 int flag; 12 int pre; 13 int step; 14 }p[MAXN],st,st1; 15 16 void bfs() 17 { 18 p[0].a=0; 19... 阅读全文
posted @ 2013-08-29 19:41 null1019 阅读(166) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=3414 1 #include 2 #include 3 #define MAXN 1000000 4 using namespace std; 5 6 int c,d,e,ans,l; 7 bool vis[120][120]; 8 struct node 9 { 10 int a,b; 11 int flag; 12 int pre; 13 int step; 14 }p[MAXN],st,st1; 15 16 void bfs() 17 { 18 p[0].a=0; 19 ... 阅读全文
posted @ 2013-08-29 19:33 null1019 阅读(224) 评论(0) 推荐(0) 编辑