Mushroom Cave
Chef is exploring a large cave looking for exotic mushrooms. It is very dark in the cave, so Chef uses torches to help him see. Torches do not last forever, so as Chef explores the cave he must find new torches to light. Specifically, once Chef picks up a torch, he may only travel K steps before it will burn out. If Chef doesn't find another torch within K steps, he will likely be eaten by a grue
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