← All problemsSign in

Escape Artemis

The Republic of Artemis is in the midst of a Zombie Apocalypse. There are $N$ cities in Artemis numbered $0$ through $N-1$ connected by $M$ bidirectional roads. There is at least one path between every pair of city and moving along every path takes the same amount of time. Mayank and Adarsh live in City $0$ and City $N-1$ respectively. There is a flight leaving Artemis at City numbered $X$. Sinc

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