Rosetta Problems

Takahashi The Strongest

https://atcoder.jp/contests/arc132/tasks/arc132_f