
SPFA
文章平均质量分 82
Lionel_D
这个作者很懒,什么都没留下…
展开
-
hdu 1535 Invitation Cards 大年初一首A 一次正向SPFA+一次逆向SPFA
Invitation CardsTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2311 Accepted Submission(s): 1125Problem DescriptionIn the age o原创 2015-02-19 17:26:33 · 1125 阅读 · 0 评论 -
hdu 1317 XYZZY 国产SPFA算法AC,,题目输入部分真特么难懂。。内有解析
XYZZYTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3017 Accepted Submission(s): 824Problem DescriptionIt has recently been disc原创 2015-02-20 21:50:08 · 1367 阅读 · 0 评论 -
蓝桥杯 算法提高 道路和航路 满分AC ,SPFA算法的SLF优化,测试数据还是比较水的,貌似没有重边
农夫约翰正在针对一个新区域的牛奶配送合同进行研究。他打算分发牛奶到T个城镇(标号为1..T),这些城镇通过R条标号为(1..R)的道路和P条标号为(1..P)的航路相连。每一条公路i或者航路i表示成连接城镇Ai(1<=A_i<=T)和Bi(1<=Bi<=T)代价为Ci。每一条公路,Ci的范围为0<=Ci<=10,000;由于奇怪的运营策略,每一条航路的Ci可能为负的,也就是-10,000<=Ci<=10,000。每一条公路都是双向的,正向和反向的花费是一样的,都是非负的。每一条航路都根据输入的A原创 2015-02-21 17:46:02 · 2448 阅读 · 0 评论 -
hdu 1548 A strange lift Dijkstra+SPFA算法AC
Problem DescriptionThere is a strange lift.The lift can stop can at every floor as you want, and there is a number Ki(0 <= Ki <= N) on every floor.The lift have just two buttons: up and down.When you at floor i,if you press the button "UP" , you will go u原创 2015-03-28 15:31:00 · 902 阅读 · 0 评论 -
hdu 2962 Trucking 最短路+二分。。Dijkstra+SPFA两种算法实现。
Problem DescriptionA certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desirable to transport as much goods as possible each trip. Unfortunately, one cannot always use the roads in the shor原创 2015-04-04 18:03:04 · 816 阅读 · 0 评论 -
hdu 2680 Choose the best route 大年三十的首A 赤裸裸的Dijkstra 做这题需要一个小技巧
Choose the best routeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8063 Accepted Submission(s): 2655Problem DescriptionOne day原创 2015-02-18 16:03:17 · 1087 阅读 · 0 评论