Question about a problem

Revision en1, by Whimpers, 2022-02-15 20:38:18

Hello I have the following problem. Does anyone know of a solution.

Consider a grid of NxM (NM<=1e5) with grid values that are either colored or not colored. We start with a blank grid and in each operation you can choose any 2x2 subgrid of the grid and paint it. If a grid square ever is painted it cannot be unpainted again. Determine the minimum number of operations to get the original grid or determine if it’s impossible.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English Whimpers 2022-02-15 20:38:18 456 Initial revision (published)