Answer to Question #53871 in C++ for priyanka
In order to defeat a zombie, player energy must be at least equal to the i-th zombie's energy. If the player succeeded in defeating the zombie, then he will be awarded with an additional energy equal to the difference between current zombie energy and the player energy.
One unit of time will be taken to complete the fight with a single zombie.
Rules of the game:-
• At any given time, a player can fight with only one zombie
• Player is allowed to choose any one zombie to fight with.
Your task is to determine whether the player will advance to the next level or not, if he plays optimally.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!