原AC代码
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxr = 1e5 + 5;
int mp[maxr];
int main()
{
int n;
cin >> n;
for(int i = 1;i <= n;i++)
{
int x;
cin >> x;
mp[x] ++;
}
int ans = -1e9;
for(int i = 1;i <= 1e5;i++)
{
ans = max(ans,mp[i]);
}
cout << ans << endl;
return 0;
}
加上n==1,输出一个乱码
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int maxr = 1e5 + 5;
int mp[maxr];
int main()
{
int n;
cin >> n;
for(int i = 1;i <= n;i++)
{
int x;
cin >> x;
mp[x] ++;
}
if(n == 1)
{
cout << "****\n";
return 0;
}
int ans = -1e9;
for(int i = 1;i <= 1e5;i++)
{
ans = max(ans,mp[i]);
}
cout << ans << endl;
return 0;
}

依旧AC
可见民间数据没有n==1的数据,不知道万恶的CCF会不会卡