Problem 1020 · Medium
Flood the land that touches the border; the land left unmarked is enclosed and cannot walk off the grid.
Open the interactive visualisation