最短路径问题
acceptedwwh
当代大学生,阳光开朗,乐于交往和求知!
展开
-
最短路径问题(Dijkstra算法)
#include #include #include #include #define INF 0x6fffffffusing namespace std;const int maxn = 10010;int map[maxn][maxn];int dist[maxn];int pre[maxn];int s;int n;bool p[maxn];void Dijkstr原创 2012-10-21 17:12:28 · 1639 阅读 · 3 评论 -
POJ3268 Silver Cow Party
POJ3268原创 2014-05-01 21:23:08 · 796 阅读 · 0 评论 -
TOJ1693(Silver Cow Party)
Silver Cow Party Time Limit(Common/Java):2000MS/20000MS Memory Limit:65536KByteTotal Submit: 58 Accepted: 28DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000)原创 2013-08-31 20:43:44 · 1017 阅读 · 0 评论 -
TOJ3744(Transportation Costs)
Transportation Costs Time Limit(Common/Java):2000MS/6000MS Memory Limit:65536KByteTotal Submit: 129 Accepted: 34DescriptionMinya Konka decided to go to Fuzhou to原创 2013-08-31 20:37:28 · 1093 阅读 · 0 评论 -
TOJ2857(Stockbroker Grapevine)
Stockbroker Grapevine Time Limit(Common/Java):1000MS/3000MS Memory Limit:65536KByteTotal Submit: 4 Accepted: 2DescriptionStockbrokers are known to overreact to rumours.原创 2013-08-31 20:49:23 · 865 阅读 · 0 评论 -
TOJ1049 Jesse's problem
Jesse's problem Time Limit(Common/Java):1000MS/10000MS Memory Limit:65536KByteTotal Submit: 31 Accepted: 15DescriptionAll one knows Jesse live in the city , but he must原创 2013-08-31 20:52:44 · 1323 阅读 · 0 评论 -
TOJ 2732存钱计划(三)(单源最短路)
存钱计划(三) 时间限制(普通/Java):1000MS/30000MS 运行内存限制:65536KByte总提交: 18 测试通过: 16描述TZC的店铺比较多,上次WY随便走只要能走到就行,现在他学聪明了。WY去买东西的话,确定一家店以后,当然他先要想想怎么样走到那家店走的路最少。店与店之间是有走的方向的,从店A到店B原创 2013-08-31 20:32:01 · 1277 阅读 · 0 评论 -
单源最短路(Bellman_Ford)
#include #include #include #include #define INF 0x7fffffffusing namespace std;const int maxn = 1000;const int maxm = 1000000;typedef struct node{ int w; int to; int next;}NODE;原创 2012-10-21 15:51:07 · 1918 阅读 · 0 评论 -
最短路径问题(SPFA)
#include #include #include #include #define INF 0x6fffffffusing namespace std;const int maxn = 1000;const int maxm = 1000000;typedef struct node{ int w; int to; int next;}NODE;原创 2012-10-21 16:52:23 · 1213 阅读 · 1 评论 -
HD1874 畅通工程续
spfa最短路径问题。原创 2014-03-20 08:26:38 · 1059 阅读 · 0 评论