Rosetta Problems

Ball in the Box

https://atcoder.jp/contests/monamieHB2021/tasks/monamieHB2021_c