Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
The problem can be solved greedily.
Mark all the others except the smallest one first.
Use the smallest one to increase the energy.
Note that the initial energy should be no less than the smallest enemy.