考场没想到empty的时候 q.front()直接gg 这代码是不是直接0了
#include<bits/stdc++.h>
using namespace std;
queue<int> q;
int a[100010];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0);
int n;
cin >> n;
for(int i = 1;i <= n;i++)
{
cin >> a[i];
}
sort(a+1,a+n+1);
for(int i = 1;i <= n;i++)
{
if(a[i] > q.front())
{
q.pop();
}
q.push(a[i]);
}
cout << q.size() << '\n';
return 0;
}