Rosetta Problems

Takahashi the Wall Breaker

https://atcoder.jp/contests/abc400/tasks/abc400_d