WormholesTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 36425Accepted: 13320DescriptionWhile exploring his many farms, Farmer John has disco...
分类:
其他好文 时间:
2015-08-09 12:10:55
阅读次数:
153
DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very peculiar because it is a one-w...
分类:
其他好文 时间:
2015-07-28 10:23:46
阅读次数:
707
poj 3259 WormholesDescriptionWhile 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...
分类:
其他好文 时间:
2015-07-26 15:53:29
阅读次数:
216
http://poj.org/problem?id=3259DescriptionWhile exploring his many farms, Farmer John has discovered a number of amazing wormholes. A wormhole is very ...
分类:
其他好文 时间:
2015-07-21 10:35:43
阅读次数:
99
题意:给一个混合图,求判断是否有负环的存在,若有,输出YES,否则NO。有重边。思路:这是spfa的功能范围。一个点入队列超过n次就是有负环了。因为是混合图,所以当你跑一次spfa时发现没有负环,但是负环仍可能存在,因为有向边! 但是单源最短路也有起点啊,难道穷举起点?不用,负环是必须有某些边是带....
分类:
其他好文 时间:
2015-07-20 23:01:34
阅读次数:
122
题目请点我
题解:
这道题思路很简单,就是简单的深搜,找出所有的组合,然后判断能否成环。关键在于如何判断能否成环,我的思路是利用递归模拟,看能否第二次经过某一个点。中间也出现了错误,首先,每次访问的下一个点应该是同一行上当前点右边的第一个点;其次,某个点被访问过必须是作为起点被访问过,而不仅仅是到达。
代码实现:/*
ID: eashion
LANG: C++
TASK: wormhole
*...
分类:
其他好文 时间:
2015-07-19 10:20:47
阅读次数:
547
题目大意:农民约翰在农场散步的时候发现农场有大量的虫洞,这些虫洞是非常特别的因为它们都是单向通道,为了方便现在把约翰的农田划分成N快区域,M条道路,W的虫洞。约翰是时空旅行的粉丝,他希望这样做,在一个区域开始,经过一些道路和虫洞然后回到他原来所在的位置,这样也许他就能见到他自己了。穿越虫洞会回到以前...
分类:
其他好文 时间:
2015-07-17 13:35:14
阅读次数:
234
uva 558 WormholesIn the year 2163, wormholes were discovered. A wormhole is a subspace tunnel through space and time connecting two star systems. Wormholes have a few peculiar properties:Wormholes are...
分类:
编程语言 时间:
2015-07-12 17:29:24
阅读次数:
130
WormholesTime Limit:2000MSMemory Limit:65536KTotal Submissions:35103Accepted:12805DescriptionWhile exploring his many farms, Farmer John has discovere...
分类:
其他好文 时间:
2015-07-10 02:08:21
阅读次数:
1098
Time Limit:2000MSMemory Limit:65536KTotal Submissions:34934Accepted:12752DescriptionWhile exploring his many farms, Farmer John has discovered a numbe...
分类:
编程语言 时间:
2015-07-08 12:49:09
阅读次数:
132