Space Exploration
CodeChefOpen on judge ↗
Our favourite Nuttela has recently started exploring space sciences. In the initial phase of his studies, he is measuring the distances of the different planets and stars from the Earth. Nuttela has numbered the planets and stars according to some ID. The ID of Earth is $0$. Till now Nuttela has finished studying only $N$ different planets and stars. For the sake of simplicity, let us consider the
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