并查集
你TB了
这个作者很懒,什么都没留下…
展开
-
种类并查集+入门题A Bug's Life
我觉得种类并查集还是先从一个基础入门题讲起吧。 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 ...原创 2018-07-31 11:28:41 · 2315 阅读 · 0 评论 -
Find them, Catch them@POJ 1703
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 identify which ...原创 2018-07-31 11:35:33 · 250 阅读 · 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-07-31 11:44:50 · 140 阅读 · 0 评论 -
Restructuring Company@CodeForces 566D
Even the most successful company can go through a crisis period when you have to make a hard decision — to restructure, discard and merge departments, fire employees and do other unpleasant stuff. Le...原创 2018-07-28 09:36:13 · 398 阅读 · 0 评论 -
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 matching the set of common character...原创 2018-07-28 09:50:44 · 327 阅读 · 0 评论