报错但是AC
  • 板块灌水区
  • 楼主Mr_yang1
  • 当前回复10
  • 已保存回复10
  • 发布时间2025/2/7 15:00
  • 上次更新2025/2/7 16:51:24
查看原帖
报错但是AC
1390324
Mr_yang1楼主2025/2/7 15:00

编译器里报错,但可以A

#include<bits/stdc++.h>
using namespace std;
const int N=2e5+10;
int n;
map<int,int>m;
int main(){
    cin>>n;
    for(int i=1,ds;i<=n;i++){
    	cin>>ds;
    	m[ds]++;
	}
	for(auto it=m.begin();it<m.end();++it){
		cout<<it->first<<" "<<it->second<<"\n";
	}
}

2025/2/7 15:00
加载中...