Infecting Clones
CodeChefOpen on judge ↗
Naruto is bored and starts playing with his shadow clones. He first places $N$ clones on the number line. Then he makes them move in a positive direction with a certain velocity. The $i^{th}$ clone starts at $X_i$ and moves with a velocity of $V_i$ in the positive direction. Initially, no two clones are at the same place i.e all $X_i$ are distinct, and also no two clones have the same velocity i.
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