0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-27 07:12:00 +00:00
OI-codes/Luogu/P2580/P2580.cpp

29 lines
458 B
C++
Raw Normal View History

#include <bits/stdc++.h>
using namespace std;
int n, m;
map<string, int> m1, m2;
string s;
int main() {
cin >> n;
while (n--) {
cin >> s;
m1[s]++;
}
cin >> m;
while (m--) {
cin >> s;
m2[s]++;
if (m2[s] > 1) {
cout << "REPEAT" << endl;
} else if (m1[s]) {
cout << "OK" << endl;
} else {
cout << "WRONG" << endl;
}
}
return 0;
}