摘要: 题目链接第一个二维的,注意一点如果num + 1 > w,num = w 这样就可以节约空间了,因为假如经过很多条边而且是最短路的话,无法存储。。 1 #include <cstdio> 2 #include <cstring> 3 #include <queue> 4 using namespace std; 5 #define INF 0x7fffffff 6 struct node 7 { 8 int u,v,next,w; 9 }edge[300001];10 int first[5001];11 int t,n;12 int dis[5001 阅读全文
posted @ 2013-05-06 20:44 Naix_x 阅读(163) 评论(0) 推荐(0) 编辑