Problem 174 · Hard

Dungeon Game

Reverse DP from bottom-right: compute minimum health needed at each cell to survive to the exit.

Open the interactive visualisation