Problem 782 · Hard

Transform to Chessboard

Rows and columns can be analysed independently as bitmasks: each must be one of two complements, balanced, and alternating.

Open the interactive visualisation