Rosetta Problems

Sweeping Out Monsters

https://atcoder.jp/contests/awc0182/tasks/awc0182_d