A bank wants to warn its customers about suspicious activity on their accounts. Every time a transaction arrives, the bank looks at the median of the transactions immediately before it, and if the new transaction is at least twice as large as , a warning is sent.
The median of a list of numbers is the value in the middle once the list is sorted. If the list has an even number of values, there is no single middle one, so the median is the arithmetic mean of the two middle values - for example the median of is .
The first transactions do not have transactions before them, so they never trigger a warning. Given the list of transactions, count how many warnings the bank sends.
Input
First line of input will be a single integer - the number of testcases.
First line of each testcase contains two integers and - the number of transactions and how many previous transactions the bank looks at.
Second line of each testcase contains integers - the amounts of the transactions, in the order they happened.
Output
For every testcase print a single line with the number of warnings the bank sends.
Example
1 8 3 2 5 3 4 3 6 2 9
2
The warnings are sent for (the three transactions before it are with median , and ) and for (the three before it are , again with median ). The transaction is not flagged even though it is large - only one transaction happened before it, not .
Constraints
the sum of over all testcases does not exceed
This problem was adapted, with permission, from Sumnjive transakcije, authored by Društvo matematičara Srbije and Fondacija Petlja.