Naruto and Chunin Exams
CodeChefOpen on judge ↗
Naruto is conducting exams for the junior ninjas and has come up with a new form of examination. A maze of $M$ X $M$ is constructed in the form of a matrix (1-indexed). Each cell has a monster of power level $M_{i,j}$. The ninjas also have their power level $P$ and they can only beat monsters with power level strictly less than their own power level. The ninjas are made to enter the maze
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.
Sign in to chat with the tutor and save your progress.
Sign in to start