Management of Strength
CodeChefOpen on judge ↗
You have got a superpower and using it you can reduce strength of devils. Using your power at the coordinate x reduces the strength of all the devils in the middle of x - m and x + m (both inclusive) by p strength. There are total of n devils and the i-th devil is standing at the coordinate x[i] having strength of y[i]. You have to destroy all the devils in minimum use of your superpower. ###
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