Police and Thief
Chef discovered that his secret recipe has been stolen. He immediately informs the police of the theft. It is known that the policeman and thief move on the number line. You are given that: - The initial location of the policeman on the number line is $X$ and his speed is $2$ units per second. - The initial location of the thief on the number line is $Y$ and his speed is $1$ unit per second. Fin
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