Rosetta Problems

Marathon

https://atcoder.jp/contests/awc0014/tasks/awc0014_b