## DMPG '16 B2 - Reward Reminiscence

View as PDF

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 64M

Author:
Problem type

After 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 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).

#### Explanation

With his score of , Bob manages to secure his spot behind only people. As a result, he is awarded