Rosetta Problems

图的连通分量

https://www.acwing.com/problem/content/3685