Rosetta Problems

Box and Ball

https://atcoder.jp/contests/agc002/tasks/agc002_b