Maximum Score From Grid Operations
On a square grid, choose for each column how far down from the top to paint it black. Maximize the sum of the values in white cells that have a black cell immediately to their left or right.
On a square grid, choose for each column how far down from the top to paint it black. Maximize the sum of the values in white cells that have a black cell immediately to their left or right.