专题五 并查集
九羽-
日有所进,月有所变,终有所成。
展开
-
Ice_cream's world I( 并查集 + 判环 )
Ice_cream's world I( 并查集 + 判环 )ice_cream's world is a rich country, it has many fertile lands. Today, the queen of ice_cream wants award land to diligent ACMers. So there are some watchtowers are ...原创 2019-10-13 18:45:27 · 108 阅读 · 0 评论 -
J - A Bug's Life POJ - 2492(带权并查集)
J - A Bug’s Life POJ - 2492(带权并查集)BackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only int...原创 2019-06-17 21:00:36 · 164 阅读 · 0 评论 -
N - Is It A Tree? POJ - 1308(并查集判断树)
N - Is It A Tree? POJ - 1308(并查集判断树)A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satis...原创 2019-06-17 19:51:16 · 205 阅读 · 0 评论 -
M - 小希的迷宫 HDU - 1272(并查集 找回路)
M - 小希的迷宫 HDU - 1272(并查集 找回路)上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相...原创 2019-06-17 19:39:08 · 173 阅读 · 0 评论 -
E - 食物链 POJ - 1182(带权并查集,有图解)
E - 食物链 POJ - 1182(带权并查集)动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y是同类。第二种说法是"2 X Y",表示X吃Y。此人对N...原创 2019-06-16 21:35:18 · 271 阅读 · 0 评论 -
D - How Many Answers Are Wrong HDU - 3038(经典带权并查集)
D - How Many Answers Are Wrong HDU - 3038(经典带权并查集)TT and FF are … friends. Uh… very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following game with him. This i...原创 2019-06-16 21:05:52 · 163 阅读 · 0 评论 -
C - How Many Tables HDU - 1213(经典并查集)
C - How Many Tables HDU - 1213(经典并查集)Today is Ignatius’ birthday. He invites a lot of friends. Now it’s dinner time. Ignatius wants to know how many tables he needs at least. You have to notice tha...原创 2019-06-14 21:52:24 · 153 阅读 · 0 评论 -
B - The Suspects POJ - 1611(并查集)
B - The Suspects POJ - 1611(并查集)Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission t...原创 2019-06-14 21:40:35 · 183 阅读 · 0 评论 -
A - Wireless Network POJ - 2236(进阶并查集)
A - Wireless Network POJ - 2236An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unexpected aftershoc...原创 2019-06-14 21:02:46 · 262 阅读 · 0 评论 -
经典并查集
小雷的冰茶几Problem Description小雷有个特殊的癖好,平时喜欢收藏各种稀奇古怪的东西,譬如。。。。,还有。。。。,也包括。。。。。小雷是一个喜欢分享的童鞋,这次小雷又给大家带来一套神奇的东西,那就是举世无双的冰茶几!顾名思义,这些茶几被冰冻住了,最主要的是他们是易碎品,毕竟被冻住了。因此小雷要很小心翼翼的移动他们。一些茶几是冻在一起的,因此一套冰茶几分为好几部分,并且如果...原创 2019-06-14 20:09:54 · 150 阅读 · 0 评论