Problem 1001 · Hard

Grid Illumination

Count lamps on each row, column and diagonal so each query is answered in constant time, then switch off the 3x3 block around it.

Open the interactive visualisation