## DMOPC '15 Contest 7 P1 - Kemonomimi Competition

View as PDF

Points: 7 (partial)
Time limit: 1.0s
Java 8 2.5s
Python 2.5s
Memory limit: 64M
Java 8 256M
Python 256M

Author:
Problem type

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:

• , identifying the kemonomimi who worked on the first submission of this problem;

• , the amount of points (out of a maximum of ), the first submission received;

• , the time elapsed in minutes from the start of the competition to the end of the first submission;

• , the amount of time in minutes FatalEagle needs to finish coding the solution to the problem undisturbed;

#### 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

3
1 3 6 9
2 1 0 20
3 3 120 1
4 9 75 12

#### Sample Output

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~

• commented on Feb. 16, 2018, 2:49 p.m.

kemonomimi

horrible nightmare

discrepancy detected

• commented on April 12, 2016, 9:18 p.m.

kyaaan~

• commented on April 12, 2016, 9:08 p.m. edited

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?

• commented on April 12, 2016, 10:24 p.m.

Yes he would. As the Explanation for the Sample Output states, for , he would begin minutes into the competition.