You are following the world championship of the Billion Players Game. There are players competing, and you want to predict the final ranking of Godflex, your favorite streamer. After analyzing recent matches, you are sure that , but you don’t know anything else.
There are offers made by the in-game bookmaker. In the -th offer, the bookmaker suggests an estimation for Godflex’s final ranking. For each offer, you must choose exactly one of the following actions:
Ignore the offer.
Accept the offer by claiming that . If you are right, you earn coins; otherwise you lose coins.
Accept the offer by claiming that . If you are right, you earn coins; otherwise you lose coins.
After you decide how to deal with all the offers, the actual Billion Players Game is played. Godflex gets an integer position in , and then all the offers are settled up.
Your total score is the number of coins you are guaranteed to earn, that is, the minimum number of coins you earn over all possible values of in . Find the maximum possible score you can guarantee.
输入格式
Each test contains multiple test cases. The first line contains the number of test cases (). The description of the test cases follows.
The first line of each test case contains three integers (, ) — the number of offers and the possible range of Godflex’s final ranking.
The second line of each test case contains integers () — the bookmaker’s estimations of Godflex’s ranking in each offer.
It is guaranteed that the sum of over all test cases does not exceed .
输出格式
For each test case, output a single line containing an integer: the maximum possible score you can guarantee.