带权并查集
文章平均质量分 88
mrcoderrev
C
展开
-
hdu 3047 (带权并查集)@
Zjnu Stadium Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3378 Accepted Submission(s): 1305 Problem Description In 12th Zhejiang原创 2017-07-15 18:35:05 · 258 阅读 · 0 评论 -
hdu 3038 How Many Answers Are Wrong (带权并查集)
TT and FF are ... friends. Uh... very very good friends -________-b FF 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 shou原创 2017-07-16 22:22:55 · 978 阅读 · 0 评论 -
hdu 2818 Building Block (多个权值的并查集)
John are playing with blocks. There are N blocks (1 M X Y : Put the whole pile containing block X up to the pile containing Y. If X and Y are in the same pile, just ignore this command. C X : Co原创 2017-07-18 11:39:44 · 204 阅读 · 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个动物,用上述两种说法,一句接一句地说原创 2017-07-16 20:52:36 · 178 阅读 · 0 评论