文章
3
粉丝
118
获赞
0
访问
28
#include<bits/stdc++.h>
using namespace std;
int main(){
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int n,q;
cin >> n;
map<int, int> mp;
int x;
for(int i = 0; i < n; i++){
cin >> x;
mp[x]++;
}
cin >> q;
for(int i = 0; i < q; i++){
cin >> x;
map<int, int>::iterator it = mp.find(x);
if(it != mp.end()) cout << "find" << endl;
else {
cout << "no" << endl;
mp[x]++;
}
}
return 0;
}
登录后发布评论
暂无评论,来抢沙发