1 solutions
-
-1
#include<bits/stdc++.h> using namespace std; const int N=1e5+10; string s[N]; int main() { int n,m; cin>>n>>m; for(int i=1;i<=n;i++) { cin>>s[i]; } set<string> h; for(int i=1;i<=m;i++) { string x; cin>>x; h.insert(x); } for(int i=1;i<=n;i++) { if(h.count(s[i])) { cout<<"Yes"<<endl; } else { cout<<"No"<<endl; } } return 0; }
- 1
Information
- ID
- 2424
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 1
- Tags
- (None)
- # Submissions
- 3
- Accepted
- 2
- Uploaded By