HDU 1856 More is better (并查集)

Hint

A and B are friends(direct or indirect), B and C are friends(direct or indirect), then A and C are also friends(indirect). In the first sample {1,2,5,6} is the result.In the second sample {1,2},{3,4},{5,6},{7,8} are four kinds of answers.

,放下一种执着,收获一种自在。放下既是一种理性抉择,也是一种豁达美。

HDU 1856 More is better (并查集)

相关文章:

你感兴趣的文章:

标签云: