← All problemsSign in

Rachel Challenges Ross

Rachel sets a game plot for Ross. She has chosen two points in the map, point $A$$(x_1, y_1)$ and point $B(x_2, y_2)$. Rachel wants Ross to move from point $A$ to point $B$. But before that Ross need to choose a number $K$. Every time he moves, he has to take $K$ steps in one direction. He can only move in 4 directions: right, left, up and down. The number $K$ should be such that Ross had to make

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