Rosetta Problems

コインと無向グラフ

https://atcoder.jp/contests/ttpc2015/tasks/ttpc2015_m