problem : https://codeforces.com/problemset/problem/855/A
#include<bits/stdc++.h>
using namespace std;
main()
{
int t;
map<string ,int> m;
cin>>t;
while(t--)
{ string s;
cin>>s;
if(m[s]==0) cout<<"NO"<<endl;
else cout<<"YES"<<endl;
m[s]++;
}
return 0;
}
0 Comments