Rosetta Problems

Polyomino Mining

https://atcoder.jp/contests/ahc030/tasks/ahc030_a