P11137 [APC001] B - Checker
Background
Xiao K is preparing for an open contest. He has an idea, but he is worried that it might be a duplicate problem, so he needs to confirm whether this problem is a duplicate. However, he still has many other things to do, so he hands this task over to you.
Description
There are $n$ problems in the problem set. The name of each problem is a string of **length less than $10$**. Let the length of a problem name be $k$. We define two problems to be **duplicate problems** if and only if their names have at least $\left\lceil\frac{k}{2} \right\rceil$ positions where the characters are the same.
Now Xiao K gives you his problem and hopes that you can help him check for duplicates (that is, compare his problem name with each of the other problem names one by one, and decide whether it is a duplicate problem).
Input Format
First, input a positive integer $n$, which indicates the number of problems in the problem set. Then input a string $s$, which is the name of Xiao K's problem.
After that, the next $n$ lines each contain a string, representing the names of these problems.
**Each input string has the same length.**
Output Format
Output two lines. On the first line, output the number of duplicate problems. If there are no duplicate problems, then output `Good job!` on the second line; otherwise, output `Make persistent efforts.`.
Explanation/Hint
**[Sample Explanation #1]**
The problem name is `chachong`. It has $0$ matching characters with the first problem, $3$ matching characters with the second problem, and $0$ matching characters with the third problem. Each name has $8$ characters, and there is no problem that has at least $8 \times 50\% = 4$ matching characters with Xiao K's problem.
**[Sample Explanation #2]**
Please note that it is possible that there are also duplicate problems within the problem set.
**[Constraints]**
For $100\%$ of the testdata, it is guaranteed that $1 \le n \le 10^4$, $1 \le k \le 10$, all strings have the same length, and they do not contain invisible characters.
Translated by ChatGPT 5