
并查集
JW12138
既然出生在这个世上,我就没想着活着回去!!!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
食物链(POJ-1182)
Description 动物王国中有三类动物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个动物,用上述两种说原创 2017-05-20 20:57:11 · 303 阅读 · 0 评论 -
The Suspects(POJ-1611)
Description 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, the best str原创 2017-05-20 21:10:22 · 234 阅读 · 0 评论 -
Wireless Network(POJ-2236)
Description 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 attacked, all compu原创 2017-05-20 21:17:13 · 601 阅读 · 0 评论 -
A Bug's Life(POJ-2492)
Description Background Professor 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原创 2017-05-20 21:03:32 · 387 阅读 · 0 评论 -
Find them, Catch them(POJ-1703)
Description The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to ide原创 2017-05-20 21:41:19 · 223 阅读 · 0 评论 -
Cube Stacking(POJ-1988)
Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each containing a single cube. Farmer John asks Betsy to p原创 2017-05-20 21:45:41 · 306 阅读 · 0 评论 -
最勇敢的机器人(Vijos-1250)
背景 Wind设计了很多机器人。但是它们都认为自己是最强的,于是,一场比赛开始了~ 描述 机器人们都想知道谁是最勇敢的,于是它们比赛搬运一些物品。 它们到了一个仓库,里面有n个物品,每个物品都有一个价值Pi和重量Wi,但是有些物品放在一起会爆炸,并且爆炸具有传递性。(a和b会爆炸、b和c会爆炸则a和c会爆炸) 机器人们可不想因此损失自己好不容易从Wind那里敲诈来的装备,于是它们想知道在原创 2017-05-22 21:30:31 · 748 阅读 · 0 评论