← All problemsSign in

Infernos

CodeChefRating 1162Open on judge ↗

Ved started playing a new mobile game called Fighting Clans. An army of $N$ enemies is approaching his base. The $i^{th}$ enemy has $H_i$ health points. An enemy gets killed if his health points become $0$. Ved defends his base using a weapon named `Inferno`. He can set the `Inferno` to one of the following two modes: - Single-Target Mode: In one second, the `Inferno` can target **exactly one**

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