Rosetta Problems

Fragile Balls

https://atcoder.jp/contests/agc045/tasks/agc045_e