题目网址:http://poj.org/problem?id=3268 题意:有N只牛,编号从1到N他们从自己的地方到X去开会然后再回来,他们都选择最短的路径,问从去到回来,每只牛走的最远距离是多少? 方法:先求从X到各个点的最短路,然后把路径交换一下,再求一次从x到各点的最短路 ...
分类:
其他好文 时间:
2016-08-22 10:36:24
阅读次数:
190
Anniversary party Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9361 Accepted Submission(s): 40 ...
分类:
其他好文 时间:
2016-08-20 10:06:25
阅读次数:
181
Anniversary party Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6955 Accepted: 4003 Description There is going to be a party to celebrate ...
分类:
其他好文 时间:
2016-08-19 12:55:47
阅读次数:
125
In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every ...
分类:
其他好文 时间:
2016-08-17 01:36:15
阅读次数:
195
Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party where there ar ...
分类:
其他好文 时间:
2016-08-14 19:21:26
阅读次数:
161
Contaminated Milk 题目描述 Farmer John, known far and wide for the quality of the milk produced on his farm, is hosting a milk-tasting party for N of his ...
分类:
其他好文 时间:
2016-08-14 07:07:52
阅读次数:
282
Description Sometimes some mathematical results are hard to believe. One of the common problems is the birthday paradox. Suppose you are in a party wh ...
分类:
其他好文 时间:
2016-08-13 21:01:39
阅读次数:
314
Actually I do not have experiences in programming with open sources/third party libs.. in linux.. I think this took me almost 3 days to figure out how ...
分类:
系统相关 时间:
2016-08-11 15:54:44
阅读次数:
143
2-SAT的入门题。 a,a',b,b'分别表示两对夫妇,如果a,b有矛盾,那么a要来,就只能来b',b要来,就只能来a'。于是建了两条边(a,b'),(b,a')。 用tarjan强连通分量缩点染色后,如果同一对夫妇染色相同,说明两个要么都来,要么都不来,就不可能有解了。否则,形成的强连通分量中必 ...
分类:
其他好文 时间:
2016-08-11 09:54:32
阅读次数:
189