For this Question: Hawkeye has been assigned to eliminate n monsters, the i<sup>th</sup> of which is of type a<sub>i</sub>. In one move, he can do either of the following:

i. Shoot down atmost any k monsters. In other words, he can shoot down any set of monsters such that the size of that set is smaller than or equal to k.
ii. Shoot down all monsters of any one type.

Find the minimum number of moves it will take him to shoot down all the monsters.The first line contains one integer t — the number of test cases. Each test case consists of two lines. 
The first line contains two space-separated integers n and k.
The second line contains n space-separated integers a<sub>1</sub>, a<sub>2</sub> . . .  a<sub>n</sub>.

<b>Constraints:</b>
1 ≤ t ≤ 10<sup>5</sup>
1 ≤ k ≤ n ≤ 10<sup>5</sup>
1 ≤ a<sub>i</sub> ≤ n
The sum of n over all test cases does not exceed 10<sup>5</sup>. For each test case, print a single value - the minimum number of moves required.Sample input
3
7 2
1 2 3 4 4 4 4
5 3
1 2 3 1 2
5 3
5 5 5 5 5

Sample output
3
2
1

Explanation:
For the first test case, the minimum moves required is 3. One way to do so is that Hawkeye can first shoot monsters 1 and 2 in one move using the second operation. 
Then he can shoot down all monsters of type 4 using the first operation, followed by shooting monster 3 by either method., I have written this Solution Code: #include <bits/stdc++.h>
#define int long long
#define endl '\n'
using namespace std;
 
typedef long long ll;
typedef long double ld;
#define db(x) cerr << #x << ": " << x << '\n';
#define read(a) int a; cin >> a;
#define reads(s) string s; cin >> s;
#define readb(a, b) int a, b; cin >> a >> b;
#define readc(a, b, c) int a, b, c; cin >> a >> b >> c;
#define readarr(a, n) int a[(n) + 1] = {}; FOR(i, 1, (n)) {cin >> a[i];}
#define readmat(a, n, m) int a[n + 1][m + 1] = {}; FOR(i, 1, n) {FOR(j, 1, m) cin >> a[i][j];}

#define print(a) cout << a << endl;
#define printarr(a, n) FOR (i, 1, n) cout << a[i] << " "; cout << endl;
#define printv(v) for (int i: v) cout << i << " "; cout << endl;
#define printmat(a, n, m) FOR (i, 1, n) {FOR (j, 1, m) cout << a[i][j] << " "; cout << endl;}
#define all(v) v.begin(), v.end()
#define sz(v) (int)(v.size())
#define rz(v, n) v.resize((n) + 1);
#define pb push_back
#define fi first
#define se second
#define vi vector <int>
#define pi pair <int, int>
#define vpi vector <pi>
#define vvi vector <vi>
#define setprec cout << fixed << showpoint << setprecision(20);
#define FOR(i, a, b) for (int i = (a); i <= (b); i++)
#define FORD(i, a, b) for (int i = (a); i >= (b); i--)
const ll inf = 1e18;
const ll mod = 1e9 + 7;
const ll mod2 = 998244353;
const ll N = 2e5 + 1;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

int power (int a, int b = mod - 2)
{
    int res = 1;
    while (b > 0) {
        if (b & 1)
            res = res * a % mod;
        a = a * a % mod;
        b >>= 1;
    }
    return res;
}

signed main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	
	read(t);
	int lim = 3e5;
	assert(1 <= t && t <= 3e5);
	
	int nsum = 0;
	while (t--)
	{
	    readb(n, k);
	    readarr(a, n);
	    assert(1 <= n && n <= lim);
	    assert(1 <= k && k <= n);
	    FOR (i, 1, n) assert(1 <= a[i] && a[i] <= n);
	    
	    int freq[n + 1] = {};
	    FOR (i, 1, n) freq[a[i]]++;
	    
	    int cnt = 0, sum = 0;
	    FOR (i, 1, n)
	    {
	        if (freq[i] < k) sum += freq[i];
	        else cnt++;
	    }
	    
	    int ans = cnt + (sum + k - 1)/k;
	    print(ans);
	    nsum += n;
	}
  	
  	assert(nsum <= lim);
}


















, In this Programming Language: C++, Now tell me if this Code is compilable or not?