并查集
FengTwoYear
敢于拼搏
展开
-
简单并查集之Wireless Network
DescriptionAn 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 c原创 2015-07-27 08:15:46 · 469 阅读 · 0 评论 -
简单并查集之按秩合并——The Suspects
DescriptionSevere 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转载 2015-07-27 08:48:54 · 571 阅读 · 0 评论 -
简单并查集之带权并查集HDU3038 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转载 2015-07-27 09:33:28 · 429 阅读 · 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个动物,用上述两种说法,一句接一转载 2015-07-27 10:58:55 · 560 阅读 · 0 评论 -
简单并查集,记录每个点有几个节点“杭电多校联赛签到题”
Problem DescriptionIt’s an interesting experience to move from ICPC to work, end my college life and start a brand new journey in company.As is known to all, every stuff in a company has a原创 2015-07-29 08:43:24 · 528 阅读 · 0 评论