← All problemsSign in

Dungeon Master

Mario is trying to clear a dungeon which is in the form of a $N*N$ grid. Each cell in the grid can have some positive value $a_{ij}$ or there can be a puzzle which Mario needs to complete to proceed further. Every time Mario enters a cell the value in the cell will be added to the total cost while traversing the grid or in the case of a puzzle, the output of the puzzle will be the value added to

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start