← All problemsSign in

Friends Meetup

CodeChefRating 1098Open on judge ↗

Chef and his friend is standing on the X-axis at the points $X_1$ and $X_2$ respectively. Chef moves one step forward each second (that is he moves to $X_1 + 1$ after the $1^{st}$ second, $X_1 + 2$ after the $2^{nd}$ second, and so on), whereas his friend moves $2$ steps forward each second (that is he moves to $X_2 + 2$ after the $1^{st}$ second, $X_2 + 4$ after the $2^{nd}$ second, and so on).

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