← All problemsSign in

Poor Deer

Two lions and a deer are at various positions on a line. You will be given their starting positions. Your task is to determine which lion will reach the deer first, assuming the deer doesn't move and the lions travel at equal speed. If the lions arrive at the same time, the deer will be allowed to move and it will escape while they fight. You are given queries in the form of X,Y and Z representi

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