map全WA求救qwq
查看原帖
map全WA求救qwq
680022
Rice_Demon_King楼主2023/11/26 17:01

代码如下

#include<bits/stdc++.h>
using namespace std;
int n,m,a[24000],x,y,ans1,ans2;
map<int,int>mp;
int main(){
	cin>>n>>m;
	for(int i=1;i<=n;i++){
		cin>>a[i];
		mp[a[i]]=0;
	}
	while(m--){
		cin>>x>>y;
		mp[x]=y;
	}
	for(int i=1;i<=n;i++){
		if(mp[a[i]]<60){
			ans2++;
			if(mp[a[i]]==0) ans1++;
		}
	}
	cout<<ans1<<endl<<ans2;
	return 0;
}

求求各位大佬帮我看看哪里出错了,互关谢谢

2023/11/26 17:01
加载中...