Sounds good Does not work
CodeChefOpen on judge ↗
Trump decides to bomb and destroy all of ISIS troops in Syria as a part of his weekend assignment. There are N troops and they can be approximated to be lying on a straight line and numbered from 0 ... N-1, where the ith troop is at a distance of i from troop 0. Placing a bomb at any troop destroys all troops at a distance ≤ k from it. He also knows the cost in terms of risk of placing the bomb 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.
Sign in to chat with the tutor and save your progress.
Sign in to start