DMPG '16 B2 - Reward Reminiscence
View as PDFAfter counting his money several hundred times, Bob's stress began melting away and his passion to become an expert in gathering intelligence was rekindled. In fact, Bob's inner potential was so great he attracted the attention of the International Organization of Intelligence at the age of !
The IOI hosts an annual competition for post-baccalaureate students, with considerable monetary awards paid out to top-ranking contestants. If  represents the total number of contestants, and 
 represents the number of people possessing a strictly greater score than Bob, then Bob will take home 
 dollars.
Bob was so passionate about the competitions themselves that he forgot to count his winnings. Help Bob determine his winnings for each contest!
Input Specification
The first line of the input contains a single integer  denoting the number of test cases to follow 
.
Every test case consists of exactly  lines. The first line of each test case contains two space-separated integers:
, the total number of contestants 
, and 
, Bob's score during the competition 
.
The second line of each case contains  space-separated integers 
 
, representing the score of the 
 contestant in no particular order (excluding Bob, the 
 contestant).
Output Specification
Your program should output  lines, with each line containing the string 
Bob wins $D at IOI!, where  is the amount Bob wins at the competition, rounded to exactly two decimal places.
Sample Input
1
5 2399
2400 2400 2399 2399
Sample Output
Bob wins $173.21 at IOI!
Explanation
With his score of , Bob manages to secure his spot behind only 
 people. As a result, he is awarded 
.
Comments