最短路径
KLFTESPACE
这个作者很懒,什么都没留下…
展开
-
1030 Travel Plan (30分)
迪杰斯特拉+逆序记录路径 默认只有一条最优路径 #include<iostream> #include<vector> #include<queue> #include<algorithm> #include<cstdio> using namespace std; const int inf = 0x3f3f3f3f; con...原创 2020-01-31 13:19:11 · 170 阅读 · 0 评论 -
Minimum Transport Cost HDU - 1385
//在UVALive - 5269过不去 Output Limit Exceeded Length #include<iostream> #include<cstdio> #include<climits> #include<string.h> using namespace std; const int N = 1000+5;...原创 2019-03-04 22:16:00 · 116 阅读 · 0 评论 -
数组模拟邻接表 vector模拟邻接表实现
转自https://www.cnblogs.com/sssy/p/6682747.html #include<iostream> #include<cstdio> using namespace std; const int E=5;//E为最大边数 const int N=3;//n为最大定点数 struct Edge { int u,v,w,next;/...转载 2019-03-05 17:32:04 · 385 阅读 · 0 评论 -
1003 Emergency (22 分)
//路径numr 若找到一条更短的,则numr替换,人数累加, 若相等,则当前路径+=之前路径,找寻最大的人数 但是 有一个例子过不去 #include<iostream> #include<cstring> #include<queue> #include<vector> using namespace std; cons...原创 2019-10-09 22:15:26 · 103 阅读 · 0 评论