Problem 2577 · Hard

Minimum Time to Visit a Cell In a Grid

Run Dijkstra on arrival times; when a cell opens too late, bounce between neighbours until the arrival parity matches the cell.

Open the interactive visualisation