
并查集
life4711
这个作者很懒,什么都没留下…
展开
-
HDU 1232 畅通工程
http://acm.hdu.edu.cn/showproblem.php?pid=1232Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?原创 2014-03-11 14:14:56 · 622 阅读 · 0 评论 -
hud 3635 并查集应用
http://acm.hdu.edu.cn/showproblem.php?pid=3635原创 2014-06-09 10:58:01 · 581 阅读 · 0 评论 -
codeforce 445B 并查集
B. DZY Loves Chemistrytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputDZY loves chemistry, and he enjoys mi原创 2014-07-07 20:28:14 · 952 阅读 · 0 评论 -
zoj 3811||牡丹江网赛 c题 并查集
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5343Edward is a rich man. He owns a large factory for health drink production. As a matter of course, there is a large warehouse in the f原创 2014-09-08 07:34:31 · 830 阅读 · 0 评论 -
2013成都站F题||hdu4786 并查集 生成树
http://acm.hdu.edu.cn/showproblem.php?pid=4786Problem Description Coach Pang is interested in Fibonacci numbers while Uncle Yang wants him to do some research on Spanning Tree. So Coach Pan原创 2014-08-28 16:50:34 · 1204 阅读 · 2 评论 -
2012长春站D题||hdu4424 并查集
http://acm.hdu.edu.cn/showproblem.php?pid=4424原创 2014-09-26 18:35:06 · 785 阅读 · 0 评论 -
hdu4313 贪心并查集 || 树形dp
http://acm.hdu.edu.cn/showproblem.php?pid=4313Problem DescriptionMachines have once again attacked the kingdom of Xions. The kingdom of Xions has N cities and N-1 bidirectional roads. The ro原创 2015-01-25 11:43:38 · 1307 阅读 · 0 评论 -
hdu5222 拓扑+并查集
http://acm.hdu.edu.cn/showproblem.php?pid=5222Problem DescriptionMiceren likes exploration and he found a huge labyrinth underground! This labyrinth has N caves and some tunnels connec原创 2015-05-09 21:52:08 · 1125 阅读 · 0 评论 -
poj 1182 并查集经典问题
http://poj.org/problem?id=1182Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类原创 2014-08-10 11:06:07 · 958 阅读 · 0 评论 -
nefu 676 并查集求解树的深度
http://acm.nefu.edu.cn/JudgeOnline/problemshow.php?problem_id=676description Little A gets to know a new friend, Little B, recently. One day, they realize that they are family 5原创 2014-05-04 21:08:31 · 810 阅读 · 0 评论 -
POJ 1611 并查集入门
http://poj.org/problem?id=1611DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize原创 2014-03-11 12:42:00 · 795 阅读 · 0 评论 -
HDU 1272
http://acm.hdu.edu.cn/showproblem.php?pid=1272Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也原创 2014-03-11 15:21:20 · 539 阅读 · 0 评论 -
CF #133(DIV.2) B
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=42070#problem/BDescriptionOne day n students come to the stadium. They want to play football, and for that they need to split into tea原创 2014-03-12 21:16:26 · 875 阅读 · 0 评论 -
畅通工程二
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=41768#problem/EDescription省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省原创 2014-03-11 21:43:42 · 748 阅读 · 0 评论 -
HDU 1856
http://acm.hdu.edu.cn/showproblem.php?pid=1856Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it原创 2014-03-11 20:13:11 · 635 阅读 · 0 评论 -
hdu 1233 畅通工程 三
http://acm.hdu.edu.cn/showproblem.php?pid=1233Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。原创 2014-03-12 13:19:51 · 3304 阅读 · 0 评论 -
hdu 1325 Vs hdu 1272 is it a tree ? 并查集:对是否是树的判断
http://acm.hdu.edu.cn/showproblem.php?pid=1325Problem DescriptionA tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected b原创 2014-03-14 16:41:44 · 714 阅读 · 0 评论 -
CodeForces 218C 并查集
http://acm.hust.edu.cn/vjudge/contest/view.action?cid=42071#problem/CDescriptionBajtek is learning to skate on ice. He's a beginner, so his only mode of transportation is pushing off from原创 2014-03-16 14:11:10 · 891 阅读 · 0 评论 -
HDU 1598 并查集
http://acm.hdu.edu.cn/showproblem.php?pid=1598Problem DescriptionXX星有许多城市,城市之间通过一种奇怪的高速公路SARS(Super Air Roam Structure---超级空中漫游结构)进行交流,每条SARS都对行驶在上面的Flycar限制了固定的Speed,同时XX星人对 Flycar的“舒适度原创 2014-03-15 16:14:49 · 675 阅读 · 0 评论 -
hdu 1829 并查集(食物链的弱化版)
http://acm.hdu.edu.cn/showproblem.php?pid=1829Problem DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two原创 2015-05-19 20:00:29 · 985 阅读 · 0 评论