Problem 3596 · Medium

Minimum Cost Path with Alternating Directions I

Each step must alternate between moving forward and moving back, and every entered cell costs its row and column product; a shortest-path search tracks the move parity.

Open the interactive visualisation