Whimpers's blog

By Whimpers, history, 2 years ago, In English

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.

  • Vote: I like it
  • -3
  • Vote: I do not like it