![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SPFA
nucleare
这个作者很懒,什么都没留下…
展开
-
最短路径·三:SPFA算法(HihoCoder - 1093)(BELLMAN-FORD队列优化)
描述万圣节的晚上,小Hi和小Ho在吃过晚饭之后,来到了一个巨大的鬼屋!鬼屋中一共有N个地点,分别编号为1..N,这N个地点之间互相有一些道路连通,两个地点之间可能有多条道路连通,但是并不存在一条两端都是同一个地点的道路。不过这个鬼屋虽然很大,但是其中的道路并不算多,所以小Hi还是希望能够知道从入口到出口的最短距离是多少?提示:Super Programming Festival Algorithm...原创 2018-05-17 21:12:08 · 168 阅读 · 0 评论 -
XYZZY HDU - 1317 (负权最短路)
t has recently been discovered how to run open-source software on the Y-Crate gaming device. A number of enterprising designers have developed Advent-style games for deployment on the Y-Crate. Your jo...原创 2018-08-07 20:34:48 · 178 阅读 · 0 评论 -
Invitation Cards POJ - 1511 (双向最短路)
n the age of television, not many people attend theater performances. Antique Comedians of Malidinesia are aware of this fact. They want to propagate theater and, most of all, Antique Comedies. They h...原创 2018-08-07 21:38:53 · 149 阅读 · 0 评论 -
Einbahnstrasse HDU - 2923 (SPFA最短路双向)
Einbahnstra e (German for a one-way street) is a street on which vehicles should only move in one direction. One reason for having one-way streets is to facilitate a smoother flow of traffic through ...原创 2018-08-08 10:51:17 · 151 阅读 · 0 评论 -
Layout POJ - 3169 (差分约束)
Layout POJ - 3169 Like everyone else, cows like to stand close to their friends when queuing for feed. FJ has N (2 <= N <= 1,000) cows numbered 1..N standing along a straight line waiting fo...原创 2019-05-01 20:14:43 · 116 阅读 · 0 评论 -
Senior Pan HDU - 6166 (两个集合的最短路)
Senior Pan HDU - 6166 Senior Pan fails in his discrete math exam again. So he asks Master ZKC to give him graph theory problems everyday. The task is simple : ZKC will give Pan a directed graph e...原创 2019-05-03 20:30:48 · 167 阅读 · 0 评论