game-of-riches_16976
There is a special game played in remote part of Rajasthan, where all people assemble with their all wealth and try to earn more wealth on the account of their current wealth.

Suppose you are also a part of this game.

The game is like, there are N people playing the game where everyone has its wealth. You are given with the information about the wealth of all other people.
There is also a M number of groups, where each person is assigned a group id and the top half of the group in terms of wealth move forward to the next level of the game.
The group id is assigned by first arranging all the persons in decreasing order their wealth, like person with highest wealth get group id 1 ,the next one 2 and similarly upto M then again the cycle repeats.

You wish to win in your group, so you wonder how many more wealthier people you have in your group. Print the number of people in your group who have more wealth than you.

Input:
First line of input contains an integer T which denoted the number of test cases, each test case contains two lines of input where first line of test case contains two space separated integers nR nG where nR is the number of people and nG is the number of groups available for assignment.

The next line of test case contains nR space separated integers wealth[i], which represents the wealth of ith person playing the game where the first number represents your own wealth.

Output:
For each test case output the number of wealthier person than you in your own group in a line.

Constraint:

1 ≤ T ≤ 10,000
1 ≤ nG ≤ nR ≤ 100
 ≤ wealth[i] ≤ 5000

SAMPLE INPUT
3
12 11
1640 3997 4133 4282 3130 3938 4628 1138 4474 4534 2218 1293 
1 1
2491 
15 6
1242 3342 4797 4252 811 4955 76 4298 3753 1104 168 17 2364 1207 4764

SAMPLE OUTPUT
0
0
1
for i in range(input()):
    s=raw_input().split(" ")
    t=raw_input().split(" ")
    l=[];
    for k in t:
        z=str(k)+".0"
        l.append(int(float(z)))
    l.sort()
    l.reverse()
    c=l.index(int(t[0]))
    l2=[]
    l2.append(int(t[0]))
    cd=c
    while True:
        cd=cd-int(s[1])
        if cd<0:
            break
        l2.append(l[cd])
    cd=c
    while True:
        cd=cd+int(s[1])
        if cd>len(l)-1:
            break
        l2.append(l[cd])
    l2.sort()
    l2.reverse()
    print l2.index(int(t[0]))