2017-10-12 AtCoder ARC #032 B - 道路工事 AtCoder 競技プログラミング B: 道路工事 - AtCoder Regular Contest 032 | AtCoder Union Find でグルーピングして グループの数を数えて グループ数 - 1 が答え AtCoder ARC #032 B - 道路工事