与‘数据结构-并查集’有关的日志

poj3352

maksyuki 发表于 oj 分类,标签: ,
0
poj3352

Road Construction

It's almost summer time, and that means that it's almost summer construction time! This year, the good people who are in charge of the roads on the tropical island paradise of Remote Island would like to repair and upgrade the var >>继续阅读

hdu1512

maksyuki 发表于 oj 分类,标签: ,
0
hdu1512

Monkey King

Problem Description

Once in a forest, there lived N aggressive monkeys. At the beginning, they each does things in its own way and none of them knows each other. But monkeys can't avoid quarrelling, and it only happens between two mon >>继续阅读

poj1703

maksyuki 发表于 oj 分类,标签:
0
poj1703

Find them, Catch them

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 gang a criminal belongs to. >>继续阅读

poj1182

maksyuki 发表于 oj 分类,标签:
0
poj1182

食物链

动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。

现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。

有人用两种说法对这N个动物所构成的食物链关系进行描述:

第一种说法是"1 X Y",表示X和Y是同类。 >>继续阅读

hdu1232

maksyuki 发表于 oj 分类,标签:
0
hdu1232

畅通工程

Problem Description

某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通 >>继续阅读