@[ZBXALQX](/user/1070547) 数组再大点,$1
\leq n \leq 2\times10^5$
by Super_excavator @ 2023-12-02 15:15:46
@[Super_excavator](/user/590609) https://www.luogu.com.cn/record/137841394 更错了~~无AC~~
by ZBXALQX @ 2023-12-02 15:17:10
@[ZBXALQX](/user/1070547)
```cpp
#include<bits/stdc++.h>
using namespace std;
int main(){
long long n,a[200006]={},ci=1,m;
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]==a[i+1]){
ci++;
}else{
cout<<a[i]<<" "<<ci<<endl;
ci=1;
}
}
return 0;
}
```
by Super_excavator @ 2023-12-02 15:23:02
@[ZBXALQX](/user/1070547) 数组开大是对的,还要 ```long long```。
by Super_excavator @ 2023-12-02 15:23:30
@[Super_excavator](/user/590609) 感谢dalao,已关
by ZBXALQX @ 2023-12-02 15:26:36