Problem 2661 · Medium

First Completely Painted Row or Column

Paint cells in the given order while counting each row and column, and stop at the first full line.

Open the interactive visualisation