题解 | #判断元素是否出现#
#include<bits/stdc++.h>
#include <map>
using namespace std;
int main(){
//write your code here......
int n, m;
cin >> n >> m;
map<int, int> map;
while(n--) {
int tmp;
cin >> tmp;
map[tmp] = 1;
}
while(m--) {
int tmp;
cin >> tmp;
if(map.find(tmp) != map.end()){
cout << "yes" << endl;
}else {
cout << "no" << endl;
}
}
return 0;
}