← All problemsSign in

Captain in trouble

Captain America has a trouble fighting against Ultron. He needs your help. Enemy robots are arranged in the battlefield on integer coordinates in a circular fashion. Captian America is standing at coordinates (xx,yy). He wants to find the location of the nearest and the farthest enemy robot. But there is a small trouble. Due to the dust around him in the battlefield, he can locate only 3 enemy r

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