← All problemsSign in

The Last Droid

CodeChefRating 3139Open on judge ↗

The droid R2-D2 is travelling in space with a special mission. In space, there are $N$ planets (numbered $1$ through $N$) and $M$ bidirectional space highways. Each space highway connects two planets and in order to use it, R2-D2 needs to have a sufficiently high *status level*. The droid’s mission consists of $Q$ stages. In each stage, there are two planets $x$ and $y$ such that the droid should

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