Ghost and angels
CodeChefOpen on judge ↗
Dexter is stuck in a maze. It consists of 100 rooms, where each of the $i^{th}$ room is connected to $(i+1)^{th}$ room. There are 3 types of rooms - room with angel, room with ghost, empty room. Dexter wants to get out of the maze as fast as possible by reaching the room number 100. He wants to escape in the minimum number of turns. In one turn Dexter can move $X$ number of rooms ahead where $1 \l
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