Saikat and Anurag are playing a game. In this game Saikat has been given an array of Integers.The size of the array is n. He needs to find the difference of the kth maximum element and the kth minimum element in the array. The number k will be given to him by Anurag. If he can find this he wins the game. As Saikat is not good with numbers can you please find the difference for him? :)
Input:
The first line contains an Integer 't' denoting the number of test cases. The next line of each test case consists of two Integers 'n' and 'k'. 'n' is the size of the array and 'k' denotes the kth maximum and minimum element in the array. The next line contains 'n' Integers denoting the array of Integers.
Output:
For each test case output the difference of the kth maximum and minimum element in the array and print the answer on a new line.
Constraints:
1 <= 10^9
(Here a[i] denotes a particular Integer in the array)
Example:
Input:
2
5 2
6 3 2 4 5
3 2
4 5 6
Output:
2
0
Explanation:
In case 1 ,2nd minimum element is 3 and 2nd maximum element is 5. So the answer is 5-3=2.
In case 2 ,2nd minimum element is 5 and 2nd maximum element is 5. So the answer is 5-5=0.