并查集
galesaur_wcy
我们一起加油啊~~~~
展开
-
A - Vessels(并查集)
There is a system of n vessels arranged one above the other as shown in the figure below. Assume that the vessels are numbered from 1 to n, in the order from the highest to the lowest, the volume of转载 2017-07-20 14:14:44 · 241 阅读 · 0 评论 -
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个动物,用上述两种说法,一句接一句地说出K句话,这K句话...原创 2018-11-16 17:57:56 · 268 阅读 · 0 评论 -
Junk-Mail Filter HDU - 2473(带删除的并查集)
Junk-Mail Filter HDU - 2473 Recognizing junk mails is a tough task. The method used here consists of two steps: 1) Extract the common characteristics from the incoming email. 2) Use a filter matc...原创 2018-11-09 10:52:33 · 247 阅读 · 0 评论 -
1013 Battle Over Cities(25 分)
1013 Battle Over Cities(25 分) It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We ...原创 2018-08-30 20:53:25 · 372 阅读 · 0 评论 -
HDU - 5438 (并查集)
Betty owns a lot of ponds, some of them are connected with other ponds by pipes, and there will not be more than one pipe between two ponds. Each pond has a value v. Now Betty wants to remove some po...原创 2018-04-11 17:35:15 · 142 阅读 · 0 评论 -
种类并查集
HDU 1829 A Bug's Life 这是今天写的第三道并查集,有了前面两道的铺垫,写这一道很快就写完了,网上博客说说这是水题.............暴风哭泣,好吧不管我还是很开心的 题目大体意思就是额? 输入一对x,y表示的是异性关系,而在处理这个关系之前看下是否是同性关系,如果是同性关系的话,那么就是错的 大体就是这样子了 然后嗯 因为不确定每个人到底是女的还是男的所以其...原创 2017-11-11 19:12:27 · 298 阅读 · 0 评论 -
G - The Suspects POJ - 1611(并查集)
G - The Suspects Severe acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, t原创 2017-07-22 16:20:00 · 223 阅读 · 0 评论 -
E - Wireless Network(并查集)
E - Wireless Network(并查集) An 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 att原创 2017-11-10 18:44:57 · 297 阅读 · 0 评论 -
F - 小希的迷宫 (并查集)
上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给你,让你帮忙判断她的原创 2017-07-19 16:57:16 · 228 阅读 · 0 评论 -
HDU - 3938(Portal)并查集+离线
HDU - 3938 ZLGG found a magic theory that the bigger banana the bigger banana peel .This important theory can help him make a portal in our universal. Unfortunately, making a pair of portals will cos...原创 2018-11-16 21:08:37 · 199 阅读 · 0 评论