
最短路径
文章平均质量分 86
Calm微笑
若不是终点,请微笑向前!
展开
-
hdoj 2544 最短路
最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 47106 Accepted Submission(s): 20779Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很原创 2016-02-05 19:02:31 · 411 阅读 · 0 评论 -
最短路径算法总结(Floyd,bellmen-ford,dijkstra,Spfa)
Dijkstra:适用于权值为非负的图的单源最短路径,用斐波那契堆的复杂度O(E+VlgV)BellmanFord:适用于权值有负值的图的单源最短路径,并且能够检测负圈,复杂度O(VE)SPFA:适用于权值有负值,且没有负圈的图的单源最短路径,论文中的复杂度O(kE),k为每个节点进入Queue的次数,且k一般但此处的复杂度证明是有问题的,其实SPFA的最坏情况应该是O(VE).Flo原创 2016-03-01 16:09:47 · 5111 阅读 · 1 评论 -
HDU 1869 六度分离 (最短路径---floyd)
六度分离Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7787 Accepted Submission(s): 3181Problem Description1967年,美国著名的社会学家斯坦利·米尔格兰姆提原创 2016-08-04 12:16:01 · 292 阅读 · 0 评论 -
HDU 1596 find the safest road (最短路径----dijkstra)
find the safest roadTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 11482 Accepted Submission(s): 4044Problem DescriptionXX星球有很多原创 2016-08-04 16:11:20 · 544 阅读 · 0 评论 -
HDU 2066 一个人的旅行 (最短路----floyd && dijkstra)
一个人的旅行Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27548 Accepted Submission(s): 9556Problem Description虽然草儿是个路痴(就是在杭电待了一年多,居然原创 2016-02-05 20:49:35 · 490 阅读 · 0 评论 -
HDU 3665 Seaside (最短路--floyd)
SeasideTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1528 Accepted Submission(s): 1107Problem DescriptionXiaoY is living in原创 2016-08-04 17:29:55 · 495 阅读 · 0 评论 -
HDU 2112 HDU Today (最短路---dijkstra+map函数)
HDU TodayTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25216 Accepted Submission(s): 6093Problem Description经过锦囊相助,海东集团终于度原创 2016-08-04 17:59:15 · 410 阅读 · 0 评论 -
HDU 5137 How Many Maos Does the Guanxi Worth(最短路--dijkstra)
How Many Maos Does the Guanxi WorthTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 512000/512000 K (Java/Others)Total Submission(s): 1937 Accepted Submission(s): 744Problem Desc原创 2016-08-04 19:55:08 · 314 阅读 · 0 评论 -
CodeForces 689B Mike and Shortcuts
B. Mike and Shortcutstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently, Mike was very busy with stu原创 2016-08-16 11:56:11 · 456 阅读 · 0 评论 -
Codeforce 601A The Two Routes
D - 楼上和楼下都是水题.Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIn Absurdistan, there are n towns (numbered 1 through n) and m bidi原创 2016-04-18 16:46:54 · 450 阅读 · 0 评论 -
poj 3259 Wormholes (Bellman-ford)
WormholesTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 39574 Accepted: 14541DescriptionWhile exploring his many farms, Farmer John has discovered a nu原创 2016-02-27 20:14:06 · 306 阅读 · 0 评论 -
poj 3660 Cow Contest(Floyd的拓展应用)
Cow ContestTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8968 Accepted: 5033DescriptionN (1 ≤ N ≤ 100) cows, conveniently numbered 1..N, are participa原创 2016-02-28 12:54:39 · 271 阅读 · 0 评论 -
hdoj 1874畅通工程续(floyd 模板)
畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 39898 Accepted Submission(s): 14745Problem Description某省自从实行了很多年的畅通工程计划后,终于修原创 2016-02-05 18:11:22 · 494 阅读 · 0 评论 -
poj 2387 Til the Cows Come Home(dijkstra)
Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 39132 Accepted: 13307DescriptionBessie is out in the field and wants to get back t原创 2016-02-09 21:26:50 · 350 阅读 · 0 评论 -
poj 1860 Currency Exchange (Bellman- Ford)
Currency ExchangeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 24432 Accepted: 8900DescriptionSeveral currency exchange points are working in our city原创 2016-02-26 21:46:14 · 309 阅读 · 0 评论 -
poj 3268 Silver Cow Party
Silver Cow PartyTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 16654 Accepted: 7604DescriptionOne cow from each of N farms (1 ≤ N ≤ 1000) conveniently原创 2016-02-12 21:12:14 · 323 阅读 · 0 评论 -
poj 2253 Frogger (floyd)
FroggerTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 32931 Accepted: 10586DescriptionFreddy Frog is sitting on a stone in the middle of a lake. Sudden原创 2016-02-16 14:11:41 · 337 阅读 · 0 评论 -
poj 1797 Heavy Transportation(dijkstra)
Heavy TransportationTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 26747 Accepted: 7143DescriptionBackground Hugo Heavy is happy. After the breakdown原创 2016-02-16 19:53:37 · 389 阅读 · 0 评论 -
HDU 2544 最短路(spfa详解)
最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 47986 Accepted Submission(s): 21137Problem Description在每年的校赛里,所有进入决赛的同学都会获得一件很原创 2016-03-01 14:42:54 · 408 阅读 · 0 评论 -
HDU 3790 最短路径问题
最短路径问题Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 19982 Accepted Submission(s): 5945Problem Description给你n个点,m条无向边,每条边都有长度d和花原创 2016-03-08 15:40:02 · 358 阅读 · 1 评论 -
HDU 1599 find the mincost route
find the mincost routeTime Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4206 Accepted Submission(s): 1693Problem Description杭州有原创 2016-08-24 09:10:14 · 437 阅读 · 0 评论