Rock Climbing

View as PDF

Submit solution

Points: 5
Time limit: 1.0s
Memory limit: 16M

Problem type

Capba J. Cloath has scoped out a vertical rock climbing wall with N (1 \le N \le 10^{6}) climbing holds positioned on it. The holds are all in a vertical line, and are numbered from 1 to N in order, with 1 being the lowest and N being the highest. Hold i is H_{i} (1 \le
H_{i} \le 10^{9}) metres above the ground. Capba wants to figure out whether or not he reach the highest hold.

However, since he's so cool, he will do this with no hands.

Starting on the ground, Capba can repeatedly perform a slightly physics-defying leap to any hold no more than M (1 \le M \le 10^{9}) metres above his current location. Alternatively, he can choose to perform an extremely physics-defying leap, to a hold no more than 2M above him — however, he only has enough energy to do this E (0 \le E
\le 10^{6}) times throughout the climb.

Given the layout of the wall and Capba's statistics, determine whether or not he can reach the top hold with a series of leaps.

Input Specification

Line 1: N, M, E.

Next N lines: Values of H_{1}, \ldots, H_{N}

All values are integers.

Output Specification

Output Too easy! if Capba can reach the highest hold, or Unfair! otherwise.

Sample Input

5 10 1

Sample Output

Too easy!


Capba can just barely leap up to hold 1, and from there to hold 2. At this point, he must perform his one allowable extremely physics-defying leap to hold 3, as it is more than 10 metres away from his current location. He can then leap straight to hold 5. Because he's that cool.


There are no comments at the moment.