重新学编程之并查集
ZZ --瑞 hopeACMer
WA就完事了
展开
-
E - Highways (最小生成树并查集)
E - HighwaysThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has a very poor system of public highways. The Flatopian government is aware of this problem and has already c...原创 2019-07-24 09:14:22 · 125 阅读 · 0 评论 -
B - Assign the task (并查集or邻接表+线段树+dfs)
B - Assign the taskThere is a company that has N employees(numbered from 1 to N),every employee in the company has a immediate boss (except for the leader of whole company).If you are the immedia...原创 2019-07-24 10:14:36 · 136 阅读 · 0 评论 -
B - 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, the best strategy is to s...原创 2019-08-13 16:50:16 · 80 阅读 · 0 评论 -
D - How Many Answers Are Wrong (扩展并查集)
TT 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 ...原创 2019-08-13 17:18:38 · 93 阅读 · 0 评论 -
A - Zjnu Stadium HDU - 3047 (带权并查集)
In 12th Zhejiang College Students Games 2007, there was a new stadium built in Zhejiang Normal University. It was a modern stadium which could hold thousands of people. The audience Seats made a circl...原创 2019-08-19 10:36:56 · 92 阅读 · 0 评论 -
B - 食物链 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句话,...原创 2019-08-19 10:57:18 · 139 阅读 · 0 评论