← 返回 amazon 的题目列表Minimum Initial Health with One-Time Armor Negating Max Attack
类型:online_judge
amazon
A game character will undergo multiple rounds of attacks, each consuming a different amount of health. The character has a one-time use armor that can fully negate one attack. What should be the character's minimum initial health to survive all the attacks? Assume the armor is always applied to the attack with the maximum damage.
Example
Input
3
10
5