← All problemsSign in

Mirror Jump

CodeChefRating 762Open on judge ↗

There are $N$ points on the number line, labeled $1$ to $N$ from left to right. Chef is initially standing at point $K$. Chef's goal is to reach point $N$. To do this, he can perform the following types of moves: 1. Move one step left - that is, if he is currently at point $X$, he can move to point $X-1$. 2. Move one step right - that is, if he is currently at point $X$, he can move to point $X

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