monica-arranges-the-pyramids
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

Ross, Monica, Rachel and Chandler are playing a game of pyramids in which they have to arrange n smaller pyramids each of diameter ri  in the form of a pyramid stack containing p distinct pyramids such that smaller pyramids are above the bigger ones. 
Monica is a clever player and she knows that in order to win the game, she has to make maximum number of pyramid stacks possible. For that,she tries to play optimally in order to maximize the total pyramid stacks.
Each stack should consist of exactly p pyramids and the diameter of each pyramid should be distinct within the stack. Help Monica in finding maximum number of pyramid stacks.

Input
First line will contain T denoting number of test cases.
For each test case first line will contain 2 integers n and k denoting number of small pyramids and pyramids in a stack respectively, and next line will contain n integers r1,r2,...,rn each representing the diameter of the pyramid.

Output
For each test case print the maximum number of pyramid stacks possible.

Input Constraints
1 ≤ n ≤ 10^5
1 ≤ p ≤ 20
1 ≤ ri ≤ 10^6

SAMPLE INPUT
2
5 3
1 2 3 4 5
7 3
1 1 1 2 3 3 3

SAMPLE OUTPUT
1
1