For this Question: You are given an integer array arr. You can choose a set of integers and remove all the occurrences of these integers in the array, your task is to print the minimum size of the set so that at least half of the integers of the array are removed.The first line contains n the size of the array and the next line contains input of the array 

<b>Constraints</b>
1 <= n<= 1e5 (n is even)
1 <= arr[i] <= 1e5Return the minimum set size Sample Input : 
10
3 3 3 3 5 5 5 2 2 7

Sample Output :
2

Explanation : 
Choosing {3, 7} will make the new array [5, 5, 5, 2, 2] which has size 5 (i. e equal to half of the size of the old array).
Possible sets of size 2 are {3, 5}, {3, 2}, {5, 2}.
Choosing set {2, 7} is not possible as it will make the new array [3, 3, 3, 3, 5, 5, 5] which has a size greater than half of the size of the old array.

Sample Input 1:
5
7 7 7 7 7

Sample Output 1:
1

Explanation : 
The only possible set you can choose is {7}. This will make the new array empty., I have written this Solution Code: /**
 *      Author : tourist1256
 *      Time   : 2022-01-12 19:43:00
 **/

#include <bits/stdc++.h>

using namespace std;

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

int minSetSize(vector<int> &arr) {
    unordered_map<int, int> counter;
    priority_queue<int> q;
    int res = 0, removed = 0;

    for (auto a : arr) counter[a]++;
    for (auto c : counter) q.push(c.second);

    while (removed < arr.size() / 2) {
        removed += q.top();
        q.pop();
        res++;
    }

    return res;
}

int main() {
#ifdef LOCAL
    auto start = std::chrono::high_resolution_clock::now();
#endif

    ios::sync_with_stdio(0);
    cin.tie(0);
    int n;
    cin >> n;
    vector<int> a(n);
    for (auto &it : a) {
        cin >> it;
    }
    cout << minSetSize(a) << "\n";
#ifdef LOCAL
    auto stop = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);
    cerr << "Time taken : " << ((long double)duration.count()) / ((long double)1e9) << "s " << endl;
#endif
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?