数据结构__并查集
shuangde800
这个作者很懒,什么都没留下…
展开
-
并查集--学习详解
文章作者:yx_th000 文章来源:Cherish_yimi (http://www.cnblogs.com/cherish_yimi/) 转载请注明,谢谢合作。 并查集学习: l 并查集:(union-find sets)一种简单的用途广泛的集合. 并查集是若干个不相交集合,能够实现较快的合并和判断元素所在集合的操作,应用很多,如其求无向图的连通分量个转载 2012-03-07 17:53:23 · 1518 阅读 · 1 评论 -
HDU 3038 How Many Answers Are Wrong? (带权并查集)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=3038题目:Problem DescriptionTT and FF are ... friends. Uh... very very good friends -________-bFF is a bad boy, he is always wooing T原创 2012-09-22 09:49:30 · 2465 阅读 · 1 评论 -
poj 1611 The Suspects(并查集)
链接:http://poj.org/problem?id=1611题目:The SuspectsTime Limit: 1000MS Memory Limit: 20000KTotal Submissions: 15926 Accepted: 7622DescriptionSevere原创 2012-09-23 00:07:53 · 1189 阅读 · 0 评论 -
poj 1182 食物链(经典!种类并查集)
链接:http://poj.org/problem?id=1182原题:Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说原创 2012-09-24 00:10:11 · 9353 阅读 · 2 评论 -
HDU 2818 Building Block, poj 1988 Cube Stacking(带权并查集)
链接:HDU: http://acm.hdu.edu.cn/showproblem.php?pid=2818POJ: http://poj.org/problem?id=1988题目:Problem DescriptionJohn are playing with blocks. There are N blocks (1 M X Y : Pu原创 2012-09-23 00:06:49 · 1998 阅读 · 0 评论 -
poj 1733 Parity game(带权并查集)
链接:http://poj.org/problem?id=1733题目:DescriptionNow and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones.原创 2012-09-24 00:05:23 · 2282 阅读 · 1 评论 -
poj 1703 Find them, Catch them(种类并查集)
链接:http://poj.org/problem?id=1703题目:Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 22289 Accepted: 6648Description原创 2012-09-24 00:07:39 · 2700 阅读 · 1 评论 -
HDU 2473 Junk-Mail Filter 【并查集+设立虚父节点(马甲)】
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2473原题:Problem DescriptionRecognizing junk mails is a tough task. The method used here consists of two steps:1) Extract the common ch原创 2012-09-13 01:10:17 · 2227 阅读 · 0 评论 -
poj 2912 Rochambeau
链接:http://poj.org/problem?id=2912题目:DescriptionN children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into t原创 2012-09-25 21:31:11 · 1811 阅读 · 0 评论 -
ZOJ 3659 Conquer a New Region(并查集)
题目链接http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3659【题目大意】有N个城市,N-1条路把这些城市连起来(刚好是一个树)。相邻的两个城市有一个运输容量C(i, j),而城市x到城市y的那条路的运输能力S取决与这条路上所经过的所有路中最小的那个容量。 以那一个城市为中心,到其他N-1个城市的运原创 2013-05-01 16:46:16 · 1605 阅读 · 0 评论 -
HDU 3047 Zjnu Stadium (带权并查集)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=3047题目:Problem DescriptionIn 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It原创 2012-09-17 00:05:14 · 4137 阅读 · 2 评论 -
HDU 3926 Hand in Hand(同构图)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=3926原题:Hand in HandTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 122768/62768 K (Java/Others)Total Submission(s): 731 Acce原创 2012-09-16 00:21:21 · 2948 阅读 · 0 评论 -
zoj 3261 Connections in Galaxy War(逆向并查集)
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3261题目:Connections in Galaxy WarTime Limit: 3 Seconds Memory Limit: 32768 KBIn order to strengthen the defe原创 2012-10-05 12:05:29 · 1936 阅读 · 0 评论 -
HDU 1272 小希的迷宫 + 1325 Is It A Tree? , 并查集
题目链接:小希的迷宫:http://acm.hdu.edu.cn/showproblem.php?pid=1272Is It A Tree:http://acm.hdu.edu.cn/showproblem.php?pid=1325题目类型: 并查集题目:A tree is a well-known data structure that is eith原创 2012-07-13 09:15:54 · 1650 阅读 · 0 评论 -
HDU 3635 Dragon Balls
题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=3635题目类型: 并查集题目:Five hundred years later, the number of dragon balls will increase unexpectedly, so it's too difficult for Monkey Kin原创 2012-07-14 00:24:31 · 1574 阅读 · 1 评论 -
HDU 1198 Farm Irrigation
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1198题目:Problem DescriptionBenny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of sa原创 2012-09-08 09:38:32 · 1869 阅读 · 0 评论 -
HDU 1811 Rank of Tetris(拓扑排序+并查集)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1811题目:Problem Description自从Lele开发了Rating系统,他的Tetris事业更是如虎添翼,不久他遍把这个游戏推向了全球。为了更好的符合那些爱好者的喜好,Lele又想了一个新点子:他将制作一个全球Tetris高手排行榜,定时更新,名原创 2012-09-08 10:14:21 · 3096 阅读 · 0 评论 -
HDU 3938 Portal(离线+Kruskal+并查集)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=3938题目:Problem DescriptionZLGG found a magic theory that the bigger banana the bigger banana peel .This important theory can help him m原创 2012-09-10 14:29:16 · 1778 阅读 · 0 评论 -
poj 1456 Supermarket (贪心, 并查集)
链接:http://poj.org/problem?id=1456题目:DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured a原创 2012-09-27 00:06:05 · 5204 阅读 · 4 评论 -
HDU 1829 A Bug's Life(基础种类并查集)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1829原题:Problem DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that t原创 2012-09-14 00:05:48 · 6936 阅读 · 3 评论 -
HDU 3461 Code Lock(并查集+二分求幂)
链接:http://acm.hdu.edu.cn/showproblem.php?pid=3461原题:Problem DescriptionA lock you use has a code system to be opened instead of a key. The lock contains a sequence of wheels.原创 2012-09-14 00:06:32 · 1954 阅读 · 0 评论 -
UVa 11503 - Virtual Friends
题目链接:UVa : http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=2498HDU: http://acm.hdu.edu.cn/showproblem.php?pid=3172类型: 并查集, 哈希原创 2012-07-29 00:05:30 · 1516 阅读 · 0 评论 -
HDU 1558 Segment set, 计算几何+并查集
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1558题目类型: 计算集合 , 并查集题目:A segment and all segments which are connected with it compose a segment set. The size of a segment set is the num原创 2012-07-13 12:09:38 · 1499 阅读 · 0 评论