Earn Your Cupcake

A delicious NxN grid is given to you. All the lattice points of this grid contain a cupcake each except for M specified points. (Those M points do not contain cupcakes.)


This is a companion discussion topic for the original entry at https://toph.co/p/earn-your-cupcake