Rosetta Problems

环形连通分量

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