Problem 4003 · Hard

Minimum Cost Path with Alternating Directions III

Run Dijkstra over cell and action-parity states, where breaking the alternating direction rule costs a penalty.

Open the interactive visualisation