Farmer John's hobby of conducting high-energy physics experiments on weekends has backfired, causing N wormholes (2 <= N <= 12, N even) to materialize ...
分类:
其他好文 时间:
2016-12-25 17:40:26
阅读次数:
252
【Summarize】 1.注意对图是否连通的判定 2.灵活运用边权取负的技巧 AOJ 0189:Convenient Location POJ 2139:Six Degrees of Cowvin Bacon POJ 3268:Silver Cow Party POJ 3259:Wormholes ...
分类:
其他好文 时间:
2016-11-23 07:51:17
阅读次数:
294
Wormholes Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 46123 Accepted: 17033 Description While exploring his many farms, Farmer John has ...
分类:
其他好文 时间:
2016-11-12 19:59:09
阅读次数:
188
Wormholes Description While exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it ...
分类:
其他好文 时间:
2016-10-12 00:37:35
阅读次数:
218
bzoj1715[Usaco2006 Dec]Wormholes 虫洞 题意: 判一个图是否有负环。点数≤500,边数≤3000。(我看不懂原题,后来看了题解,就直接这样说了) 题解: SPFA中如果一个点被更新了n次以上,那么这个图中存在负环。 代码: 20160912 ...
分类:
其他好文 时间:
2016-09-16 16:54:25
阅读次数:
135
Bellman-Ford可以求有负权的图的最短路,也可以判断是否有负环存在。 单源最短路模板 如果没有环,最多更新n-1次,n是点的个数,如果更新了n次,证明图中有环。因为求的是最短路,所以一般判断的是负环,正环也可以判断的。 poj3259 Wormholes 求是否存在负环 #include < ...
分类:
编程语言 时间:
2016-09-01 21:31:27
阅读次数:
220
Farmer John's hobby of conducting high-energy physics experiments on weekends has backfired, causing N wormholes (2 <= N <= 12, N even) to materialize ...
分类:
其他好文 时间:
2016-08-28 18:14:41
阅读次数:
234
DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-way path that delivers you to its destination at a t...
分类:
编程语言 时间:
2016-08-12 18:29:06
阅读次数:
222
POJ 3259 Wormholes Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu POJ 3259 Wormholes Description While exploring his many farms, F ...
分类:
其他好文 时间:
2016-08-12 00:39:53
阅读次数:
577