Tree Recovery Description Little Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees ...
分类:
其他好文 时间:
2016-06-19 15:29:44
阅读次数:
184
1689: [Usaco2005 Open] Muddy roads 泥泞的路 Description Farmer John has a problem: the dirt road from his farm to town has suffered in the recent rainstor ...
分类:
其他好文 时间:
2016-06-18 11:32:57
阅读次数:
258
POJ 1724 ROADS Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 12766 Accepted: 4722 Description N cities named with numbers 1 ... N are con ...
分类:
其他好文 时间:
2016-06-13 22:04:15
阅读次数:
155
POJ 3411 Paid Roads Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6553 Accepted: 2430 Description A network of m roads connects N cities ...
分类:
其他好文 时间:
2016-06-13 21:51:36
阅读次数:
155
描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1626 给出\(n\)个点的坐标,其中一些点已经连通,现在要把所有点连通,求修路的最小长度. 分析 已经连好一些边的最小生成树问题. 这里顺带复习了一下Prim和Krusakal. Prim的证明 ...
分类:
其他好文 时间:
2016-06-13 18:45:49
阅读次数:
196
传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=1116 题目大意:Byteotia城市有n个 towns m条双向roads. 每条 road 连接 两个不同的 towns ,没有重复的road. 你要把其中一些road变成单向边使得:每个t ...
分类:
其他好文 时间:
2016-06-12 18:38:50
阅读次数:
124
描述 http://www.lydsy.com/JudgeOnline/problem.php?id=1621\(n\)头奶牛,刚开始在一起,每次分成\(x\)和\(x+m\)两部分,直到不能再分,问最后一共有几部分. 分析 可以知道当前奶牛数\(n=x+x+m\),所以可以继续分的必要条件是\(n ...
分类:
其他好文 时间:
2016-06-12 12:32:49
阅读次数:
352
Description The cows have reconstructed Farmer John's farm, with its N barns (1 <= N <= 150, number 1..N) after the terrible earthquake last May. The ...
分类:
其他好文 时间:
2016-06-11 00:28:26
阅读次数:
223
Description In a country there are n cities connected by m one way roads. You can paint any of these roads. To paint a road it costs d unit of money w ...
分类:
其他好文 时间:
2016-06-10 16:13:55
阅读次数:
232
Description Berland has n cities connected by m bidirectional roads. No road connects a city to itself, and each pair of cities is connected by no mor ...
分类:
其他好文 时间:
2016-06-06 21:51:54
阅读次数:
325