← All problemsSign in

Ron in Trouble

Harry has gone ahead to face Professor Quirrell after Ron advised him to do so. Ron needs to finish the chess game as soon as possible to help Harry. In our problem, Ron is playing a different game. Suppose Ron has to move a Queen piece kept at location (X, Y) to reach a required block (A, B) in least number of moves. Help him determine the least number of moves. Input The first line of the in

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