ACM_最短路径
名字太长容易被发现并打死
这个作者很懒,什么都没留下…
展开
-
POJ -2387 Til the Cows Come Home(Dijkstra,Bellman-Ford)
Til the Cows Come HomeTime Limit: 1000MSMemory Limit: 65536KDescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes...原创 2019-08-19 16:17:22 · 293 阅读 · 0 评论 -
POJ -1847 Tram(Bellman-Ford)
TramTime Limit: 1000MSMemory Limit: 30000KDescriptionTram network in Zagreb consists of a number of intersections and rails connecting some of them. In every intersection there is a switch ...原创 2019-08-21 20:07:46 · 168 阅读 · 0 评论 -
HDU -2544 最短路(Bellman-Ford)
最短路Time Limit: 5000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很漂亮的t-shirt。但是每当我们的工作人员把上百件的衣服从商店运回到赛场的时候,却是非常累的!所以现在他们想要寻找最短的从商店...原创 2019-08-21 19:44:47 · 178 阅读 · 0 评论 -
HDU -2112 HDU Today(Bellman-Ford)
HDU TodayTime Limit: 15000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description经过锦囊相助,海东集团终于度过了危机,从此,HDU的发展就一直顺风顺水,到了2050年,集团已经相当规模了,据说进入了钱江肉丝经济开发区500强。这时候,XHD夫...原创 2019-08-21 19:41:02 · 226 阅读 · 0 评论 -
POJ -1502 MPI Maelstrom(Bellman_Ford)
MPI MaelstromTime Limit: 1000MSMemory Limit: 10000KDescriptionBIT has recently taken delivery of their new supercomputer, a 32 processor Apollo Odyssey distributed shared memory machine wit...原创 2019-08-21 10:14:34 · 212 阅读 · 0 评论 -
POJ -1860 Currency Exchange(Bellman-Ford,判正环)
Currency ExchangeTime Limit: 1000MSMemory Limit: 30000KDescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular curr...原创 2019-08-20 21:10:20 · 346 阅读 · 0 评论 -
POJ -3660 Cow Contest(Floyd)
Cow ContestTime Limit: 1000MSMemory Limit: 65536KDescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1…N, are participating in a programming contest. As we all know, some cows code bette...原创 2019-08-20 17:04:33 · 226 阅读 · 0 评论 -
HDU -1595 find the longest of the shortest(Dijkstra,路径记录)
find the longest of the shortestTime Limit: 1000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem DescriptionMarica is very angry with Mirko because he found a new girl...原创 2019-08-20 16:23:00 · 238 阅读 · 0 评论 -
POJ -3259 Wormholes(Bellman-Ford 判负环)
WormholesTime Limit: 2000MSMemory Limit: 65536KDescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is...原创 2019-08-20 11:13:02 · 250 阅读 · 0 评论 -
POJ -3268 Silver Cow Party(Dijkstra,置换矩阵)
Silver Cow PartyTime Limit: 2000MSMemory Limit: 65536KDescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1…N is going to attend the big cow party to be held at far...原创 2019-08-20 09:03:01 · 232 阅读 · 0 评论 -
Floyd 模板
Floyd算法适用于多源的情况,用dis[st][en]就可以轻松的查询st到en的最短长度。具体原理我也不太懂,记住模板就行参考链接:https://blog.csdn.net/qq_35644234/article/details/60875818#include <iostream>#include <algorithm>#include <cstdl...原创 2019-08-19 20:01:42 · 318 阅读 · 0 评论 -
Bellman-Ford 模板+路径标记
#include <iostream>#include <algorithm>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#include <queue>#include <set>using ...原创 2019-08-19 19:14:41 · 278 阅读 · 0 评论 -
HDU-3790 最短路径问题(Bellman-Ford)
最短路径问题Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Problem Description给你n个点,m条无向边,每条边都有长度d和花费p,给你起点s终点t,要求输出起点到终点的最短距离及其花费,如果最短距离有多条路线,则输出花费最少的。Input输入n,...原创 2019-08-19 19:06:45 · 252 阅读 · 0 评论 -
Dijkstra 模板+标记路径
#include <iostream>#include <algorithm>#include <cstdlib>#include <cstring>#include <cmath>#include <cstdio>#include <queue>#include <set>using ...原创 2019-08-19 16:42:00 · 323 阅读 · 0 评论 -
POJ -2240 Arbitrage(Bellman-Ford,判正环)
ArbitrageTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 31732 Accepted: 13184DescriptionArbitrage is the use of discrepancies in currency exchange rates to transform one unit of a cur...原创 2019-08-21 20:15:39 · 200 阅读 · 0 评论