Rosetta Problems

Connecting Pipes

https://atcoder.jp/contests/awc0089/tasks/awc0089_b