#UnknownID23. XHXMMMl31IoTWg#^,:&
XHXMMMl31IoTWg#^,:&
Statement
You are given an array of integers.
The median of an array is the number , where is the array sorted in non-decreasing order. For example, the median of the array is , as in the sorted array , the number at index is , and the median of the array is , as in the sorted array , the number at index is .
You are allowed to choose an integer ( ) and increase by in one operation.
Your task is to find the minimum number of operations required to increase the median of the array.
Note that the array may not necessarily contain distinct numbers.
Format
Input
Each test consists of multiple test cases. The first line contains a single integer ( ) — the number of test cases. Then follows the description of the test cases.
The first line of each test case contains a single integer ( ) — the length of the array .
The second line of each test case contains integers ( ) — the array .
It is guaranteed that the sum of the values of over all test cases does not exceed .
Output
For each test case, output a single integer — the minimum number of operations required to increase the median of the array.
Sample
8
3
2 2 8
4
7 3 3 1
1
1000000000
5
5 5 5 4 5
6
2 1 2 3 1 4
2
1 2
2
1 1
4
5 5 5 5
1
2
1
3
2
1
2
3
相关
在下列比赛中: