Destroy the Enemy
CodeChefOpen on judge ↗
A war is going on between two countries. You are the military head and got information from intelligence about the positions of the enemy troops. You have the missiles and when they hit the target they create a destruction in a region of radius D. Assume that the y coordinate of all the troops is same and have different x co-ordinates as x1,x2, …xi,…xn. Also assume that all troops are in the range
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