Pls tell me the test case my code is failing to pass

Question link

#include <bits/stdc++.h>
using namespace std;
#define ll long long

void breathe(void)
{
    ll n;
    cin >> n;
    map<ll, ll> m;
    for (ll i = 0; i < n; i++)
    {
        ll temp;
        cin >> temp;
        m[temp] += 1;
    }

    vector<ll> ans;
    while (m[0])
    {
        ll count = 0;
        for (auto &i : m)
        {
            if (i.second)
            {
                count += 1;
                i.second -= 1;
            }
            else
            {
                break;
            }
        }
        ans.push_back(count);
    }

    for (auto i : m)
    {
        if (i.second)
        {
            for (ll j = 0; j < i.second; j++)
            {
                ans.push_back(0);
            }
        }
    }

    cout << ans.size() << '\n';
    for (ll i = 0; i < ans.size(); i++)
    {
        cout << ans[i] << ' ';
    }
    cout << '\n';

    return;
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    ll t = 1;
    cin >> t;
    while (t--)
    {
        breathe();
    }
    return 0;
}