FatalEagle is participating in the Educational Computing Olympiad for Otakus (ECOO). It seemed to him that he was in yet another ordinary competition to fly through when he realizes that his
other teammates are kemonomimi.
The contest consists of
problems, with a maximum of
submissions available per problem per team. While FatalEagle was napping, his teammates started without him! Each of the
problems was attempted exactly once, with the
kemonomimi's submission for the
problem receiving
points.
FatalEagle is able to concurrently solve all
problems provided that he has enough time. However, just the thought of having such beautiful anthropomorphic females on the same team as himself is enough to drive FatalEagle insane! Each of the kemonomimi
has her own cuteness factor
which increases the time he takes to produce his solution by
.
Having exhausted all of their energy, the kemonomimi could no longer concentrate on the tasks at hand and called upon their teammate FatalEagle to finish the contest. Not wanting to waste any more of the time remaining of the original
hours, FatalEagle would really like to know how many additional points he can earn.
Input Specification
The first line of input contains
.
The second line of input contains
space-separated integers
, representing the cuteness factor of the
kemonomimi.
The next
lines contain
space-separated integers
,
,
,
describing the
problem:
Output Specification
Output
lines, the
of which represents the number of additional points FatalEagle can earn concurrently for the
problem.
Output The kemonomimi are too cute!
instead if the problem cannot successfully be solved in time.
Sample Input
Copy
3
1 3 6 9
2 1 0 20
3 3 120 1
4 9 75 12
Sample Output
Copy
9
7
The kemonomimi are too cute!
Explanation for Sample Output
FatalEagle starts programming concurrently
hours after the start of the competition! The kemonomimi woke him up after their last submission,
minutes into the competition.
The second kemonomimi contributed to the first problem and her lingering aura of cuteness triples the time taken for FatalEagle to type up a solution; Therefore, it takes
minutes to solve this problem, finishing just as the contest ends!
The second problem was attempted by the third kemonomimi, taking
minutes to solve.
Unfortunately, the cuteness of the fourth kemonomimi was just too much for FatalEagle to bear, and he is unable to solve the third problem in time.
FatalEagle jolts awake in his bed, drenched in sweat. What a horrible nightmare!
...
nyah~
Comments
discrepancy detected
kyaaan~
To clarify, the time at which FatalEagle begins working on the problems concurrently is the latest of all the submission times? So if S = [3, 10, 20, 50, 2], he would start at 50 minutes?
Yes he would. As the Explanation for the Sample Output states, for![S = [\ 0, 120, 75\ ]](https://static.dmoj.ca/static/blank.b44917055649.gif)
, he would begin 
minutes into the competition.