855A - Tom Riddle Diary
28 Jan 2021 — Tags: None
Click to show code.
using namespace std;
map<string, bool> exists;
int main(void)
{
int n;
string s;
cin >> n;
while (n--)
{
cin >> s;
if (exists[s])
cout << "YES" << endl;
else
cout << "NO" << endl;
exists[s] = true;
}
return 0;
}