Rosetta Problems

Construction of a Communication Network

https://atcoder.jp/contests/awc0127/tasks/awc0127_d