Rosetta Problems

Grid Repainting 2

https://atcoder.jp/contests/abc096/tasks/abc096_c