Rosetta Problems

Takahashi And Pass-The-Ball Game

https://atcoder.jp/contests/abc310/tasks/abc310_g