PEG Test – Oct 3rd, 2014
Firebending is an intense and aggressive bending art which uses concentrated barrages of fire, controlled by one's inner chi to overwhelm opponents. According to uncle Iroh, fire is the element of power. Of course, with great power comes great responsibility. Aang has just gained a new friend and firebending master, Zuko, to teach him the ways of the dragons.
In the past, Aang has attempted firebending on his own. However, due to a serious incident where he accidentally burned Katara, he's learned that fire is not to be toyed with. Ever since, Aang has been scared of firebending. Zuko realized what he must do – to teach Aang control. Only when Aang feels completely in control can his true training begin.
As an exercise, Zuko places
Aang is very new at this, and can only handle a certain amount of leaves
at once. Throughout the entire exercise, he is currently only able to
focus his chi onto at most
Input Specification
Line 1: Two integers
Line 2:
Output Specification
A single integer representing the number of seconds until the earliest leaf to burn out has fully burned out.
Sample Input 1
10 3
8 7 3 8 5 5 6 3 9 3
Sample Output 1
5
Sample Input 2
1 1
3
Sample Output 2
6
Comments
The statement claims,
. However, there is a case where 
is equal to zero.
https://dmoj.ca/submission/6933803
Could the problem statement mention that Aang wants to make time it takes before the first leaf burns out as long as possible?
I was kind of confused about which leaves he wanted to choose, I didn't understand what the point was.
I agree. They didn't make it clear.