Rosetta Problems

Line of Handshakes

https://atcoder.jp/contests/awc0003/tasks/awc0003_b