并查集
CHEN_XU_LING
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
K - Rochambeau(POJ2912)
N children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it is possible that some group is empty). You don’t know who is the judge, or how the children are grouped. T.原创 2020-12-10 10:54:44 · 173 阅读 · 0 评论 -
J - A Bug‘s Life(加权并查集)
J - A Bug’s LifeBackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gender. In his experiment, individual bugs原创 2020-12-10 10:18:48 · 201 阅读 · 0 评论 -
How Many Answers Are Wrong(HDU 3038 带权并查集判错)
How Many Answers Are WrongTT 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 is a very humdrum game. To begin with, TT should write down a sequence of integers原创 2020-12-08 19:28:25 · 208 阅读 · 0 评论 -
食物链
动物王国中有三类动物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个动物,用上述两种说法,一句接一句地说出K句话,这K句话有的是真的,有的是假的。当一句话满足下列三条之一时,这句话就是假话,否则就是真话。1) 当前的话与前面的某些.原创 2020-12-06 16:42:41 · 276 阅读 · 0 评论 -
C - How Many Tables 杭电oj_____1213
How Many TablesToday 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 that not all the friends know each other, and all the friends do not want to stay原创 2020-12-05 20:53:32 · 203 阅读 · 0 评论 -
L - 小希的迷宫 杭电oj-----1272
小希的迷宫上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的设计图是否符合她的设计思路。比如下面的例子,前两个是符合条件的,但是最后一个却有两种方法从5到达8原创 2020-12-05 20:07:41 · 464 阅读 · 0 评论 -
Is It A Tree?并查集啊!!!!!!!!!!
Is It A Tree?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 satisfying the following properties.There is exactly one node, called the root, to w原创 2020-12-05 11:30:11 · 215 阅读 · 0 评论 -
poj 1611 B - The Suspects 经典并查集的问题!!
Severe acute respiratory syndrome (SARS), an atypical pneumonia ofunknown aetiology, was recognized as a global threat in mid-March2003. To minimize transmission to others, the best strategy is to separate the suspects from others. In the Not-Spreading-.原创 2020-12-05 10:27:42 · 285 阅读 · 0 评论 -
A - Wireless Network
A - Wireless NetworkAn 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 aftershock attacked, all computers in the network were all broken. The comput原创 2020-11-26 09:13:30 · 188 阅读 · 0 评论
分享