Hide

Problem B
Election

/problems/election/file/statement/en/img-0001.jpg
Image by democratic alliance cc by-sa 2.0
After all the fundraising, campaigning and debating, the election day has finally arrived. Only two candidates remain on the ballot and you work as an aide to one of them.

Reports from the voting stations are starting to trickle in and you hope that you can soon declare a victory.

There are $N$ voters and everyone votes for one of the two candidates (there are no spoiled ballots). In order to win, a candidate needs more than half of the votes. A certain number $M \leq N$ of ballots have been counted, and there are $V_ i$ votes for candidate $i$ ($V_1+V_2 = M$).

Due to the historical data and results of highly scientific polls, you know that each of the remaining votes has a $50\% $ chance to go to your candidate (the first candidate, corresponding to $V_1$). That makes you think that you could announce the win before all the votes are counted. So, if the probability of winning strictly exceeds a certain threshold $W$, the victory is yours! We just hope you are sure of this, we don’t want any scandals...

Input

The first line of input contains a single positive integer $T \leq 100$ indicating the number of test cases. Next $T$ lines each contain four integers: $N$, $V_1$, $V_2$ and $W$ as described above.

The input limits are as follows:
$1 \leq N \leq 50$
$50 \leq W < 100$
$V_1,V_2 \geq 0$
$V_1+V_2 \leq N$

Output

For each test case print a single line containing the appropriate action:

  • If the probability that your candidate will win is strictly greater than $W\% $, print

    GET A CRATE OF CHAMPAGNE FROM THE BASEMENT!

  • If your candidate has no chance of winning, print

    RECOUNT!

  • Otherwise, print

    PATIENCE, EVERYONE!

Sample Input 1 Sample Output 1
4
5 0 3 75
5 0 2 75
6 1 0 50
7 4 0 75
RECOUNT!
PATIENCE, EVERYONE!
PATIENCE, EVERYONE!
GET A CRATE OF CHAMPAGNE FROM THE BASEMENT!

Please log in to submit a solution to this problem

Log in