#include <bits/stdc++.h>
using namespace std;
string s[100005], ss[100005];
map <string, int>check;
bool flag[100005];
int main(){
int n;
cin>>n;
for (int i=1; i<=n; i++){
cin>>s[i];
check[s[i]]++;
}
int m;
cin>>m;
for (int i=1; i<=m; i++){
cin>>ss[i];
int a=stoi(ss[i], 0, 10);
if (check[ss[i]]==1) cout<<"OK"<<"\n";
else if (check[ss[i]]==2 && flag[a]==0){
cout<<"REPEAT"<<"\n";
flag[a]=1;
}else cout<<"NO"<<"\n";
}
return 0;
}
该函数的介绍,然后我就把他用在代码里了,但是爆了RE,思路就是把ss[i]转成int类型用flag[ss[i]]标记
求报错原因,求调