Rosetta Problems

Reachable Cells

https://atcoder.jp/contests/agc028/tasks/agc028_f2