#P3949. 答案错误
答案错误
Description
Each problem that was WA has a score. To judge whether the degree of WA problems is the same for the two people, Xiao X uses the following method:
When bored, she came up with a magical function:
She believes that no matter what values take, if the sums of over two groups are equal, then the error levels of the two groups of problems are very similar.
Suppose there are two modified sets of WA problems with scores and . When , the magical function is:
Then .
Obviously: $f(1) + f(4) + f(6) + f(7) = 124 = f(2) + f(3) + f(5) + f(8)$.
For this set of coefficients, this partition is valid. It can be proven that for any values of , grouping according to the above scheme satisfies the condition (the sums of over the two groups are the same). If you do not believe it, you can enumerate manually (#huaji).
So is a valid grouping.
Input Format
The first line contains an integer , meaning there are WA problems, with scores from to , with .
The second line contains an integer , indicating there are queries.
The last line contains integers, each asking whose name is on the WA problem with score .
(Because Xiao X is relatively weak, we assume the WA problem with score belongs to her.)
Output Format
Output lines, each containing a character or , indicating whose signature is on the WA problem with score .
3
2
4 5
X
Z
Hint
Constraints and Conventions
- For of the testdata, , .
- For of the testdata, , .
- For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号