For this Question: A singer named Tombaz has a setlist of n songs. For each operation, the singer selects two songs a<sub>i </sub>and a<sub>j</sub> ( i &ne; j, 1 &le; i, j &le; n) which represents the duration of songs and performs one of the following:
1. If a[i] = a[j] make the duration of both songs equal to zero.
2. Else shorten the duration of both songs to a minimum of two durations.

Tombaz wants to know the minimum number of operations required to shorten the duration of all songs to 0. It can be assumed that there always exists a sequence of operations to achieve this goal.The first line contains a single integer n, the number of songs.
The second line contains n integers for the duration of the songs.

<b>Constraints: </b>
2 &le; n &le; 100
0 &le; a[i] &le; 10Print a single integer - the minimum number of operations to change all song's duration in the sequence to 0.Input:
3
1 2 3
Output:
3
Explanation:
One of the possible ways to change all numbers in the sequence to 0 : 
In the 1st operation, a<sub>1</sub> < a<sub>2</sub>, after the operation, a<sub>2</sub> = a<sub>1</sub> = 1. Now the sequence a is [1, 1, 3].
In the 2nd operation, a<sub>1</sub> = a<sub>2</sub> = 1, and after the operation, a<sub>1</sub> = a<sub>2</sub> = 0. Now the sequence a is [0, 0, 3]. 
In the 3rd operation, a<sub>2</sub> < a<sub>3</sub>, and after the operation, a<sub>3</sub> = 0. Now the sequence a is [0, 0, 0]. So the minimum number of operations is 3., I have written this Solution Code: #include <bits/stdc++.h>

using namespace std;

signed main() {
    int n;
    cin >> n;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
        cin >> a[i];
    }
    sort(a.begin(), a.end());

    int ans = 0;
    map<int, int> mp;
    for (int i = 0; i < n; i++) {
        mp[a[i]] += 1;
    }
    for (auto &i : mp) {
        if (i.first) {
            ans += i.second / 2;
            i.second %= 2;
        }
    }
    // debug_out(ans);
    int cnt = 0;
    for (auto &i : mp) {
        if (i.first and i.second) {
            ans += 1;
        }
    }
    cout << ans << "\n";
    return 0;

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