#P2580. 于是他错误的点名开始了
于是他错误的点名开始了
Description
After that, the principal appointed you as a special agent to record his roll calls every day. The principal will provide the number of chemistry competition students and the roster, and you need to tell the principal whether he called the names correctly. (Why not just stop him from playing Hearthstone.)
Input Format
The first line contains an integer , the number of students in the class.
The next lines each contain a string representing a name (all distinct, lowercase letters only, length no more than ).
The -th line contains an integer , the number of names the coach called.
The next lines each contain a string representing a name called by the coach (lowercase letters only, length no more than ).
Output Format
For each name called by the coach, output one line.
If the name is correct and appears for the first time, output OK. If the name is incorrect, output WRONG. If the name is correct but not the first time, output REPEAT.
5
a
b
c
ad
acd
3
a
a
e
OK
REPEAT
WRONG
Hint
- For of the testdata, , .
- For of the testdata, , .
- For of the testdata, , .
: A new set of Hack testdata was added.
Translated by ChatGPT 5
京公网安备 11011102002149号