随笔分类 -  BFS

摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #define sc(x) scanf("%d",&x) 7 #define pf(x) printf("%d\n",x) 8 #define P printf("\n") ... 阅读全文
posted @ 2015-03-13 20:57 PastLIFE 阅读(250) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define sc(x) scanf("%d",&x) 6 #define CL(x, y) memset(x,y,sizeof(x)) 7 using namespace std; 8 cons... 阅读全文
posted @ 2015-03-12 12:35 PastLIFE 阅读(190) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define CL(x, y) memset(x, y, sizeof(x)) 6 using namespace std; 7 const int MAX = 5; 8 int N, i, j,... 阅读全文
posted @ 2015-03-10 20:08 PastLIFE 阅读(136) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define CL(x, y) memset(x,y,sizeof(x)) 6 using namespace std; 7 const int MAX = 33; 8 int A... 阅读全文
posted @ 2015-03-10 18:56 PastLIFE 阅读(138) 评论(0) 推荐(0)
摘要:#include #include #include #include #define CL(x, y) memset(x,y,sizeof(x))using namespace std;const int MAX = 55;int N, T, A, B, C, i, j, k;int used[M... 阅读全文
posted @ 2015-03-10 16:16 PastLIFE 阅读(116) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define CL(x,y) memset(x,y,sizeof(x)) 6 using namespace std; 7 struct node 8 { 9 int x... 阅读全文
posted @ 2015-03-09 21:47 PastLIFE 阅读(102) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define CL(x, y) memset(x, y, sizeof(x)) 6 using namespace std; 7 const int MAX = 28; 8 int N, a, b... 阅读全文
posted @ 2015-03-09 17:18 PastLIFE 阅读(109) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define CL(x, y) memset(x,y,sizeof(x)) 6 using namespace std; 7 const int MAX = 200005;//100005太小了?... 阅读全文
posted @ 2015-03-09 12:47 PastLIFE 阅读(162) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #define sc(x) scanf("%d",&(x)) 8 #define pf(x) printf("%d\n", x) 9 #define ... 阅读全文
posted @ 2015-03-09 10:50 PastLIFE 阅读(106) 评论(0) 推荐(0)
摘要:注意结构体队列的使用,在队列中,一条完整的路径才是正确的,中间的歧路最后还是走不通转载:http://blog.csdn.net/yulanarti/article/details/1787971 ——> 说明sprintf()的作用注意 sprintf(num, "%d", cur.num);//... 阅读全文
posted @ 2015-03-08 22:10 PastLIFE 阅读(128) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #define CL(x, y) memset(x, y, sizeof(x)) 5 using namespace std; 6 const int INF = 1 >ch) 18 { 19 ... 阅读全文
posted @ 2015-03-04 19:28 PastLIFE 阅读(719) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define sc(x) scanf("%d",&(x)) 6 #define pf(x) printf("%d\n", x) 7 #define CL(x, y) memset(x... 阅读全文
posted @ 2015-02-28 15:39 PastLIFE 阅读(156) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 #include 4 #include 5 #define sc(x) scanf("%d",&(x)) 6 #define pf(x) printf("%d\n", x) 7 #define CL(x, y) memset(x... 阅读全文
posted @ 2015-02-28 15:00 PastLIFE 阅读(123) 评论(0) 推荐(0)