mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-30 22:56:27 +00:00
27 lines
460 B
C++
27 lines
460 B
C++
#include <iostream>
|
|
#include <map>
|
|
#include <string>
|
|
|
|
using std::cin;
|
|
using std::cout;
|
|
using std::endl;
|
|
|
|
int n, m;
|
|
std::string s[100005], a;
|
|
std::map<std::string, bool> map;
|
|
|
|
int main() {
|
|
cin >> n >> m;
|
|
for (int i = 1; i <= n; i++) {
|
|
cin >> s[i];
|
|
}
|
|
for (int i = 1; i <= m; i++) {
|
|
cin >> a;
|
|
map[a] = true;
|
|
}
|
|
for (int i = 1; i <= n; i++) {
|
|
cout << (map[s[i]] ? "Yes" : "No") << endl;
|
|
}
|
|
return 0;
|
|
}
|