Qaq is too sleepy. Let's talk about your own ideas;
In fact, this question is very easy to read wrong questions or think wrong, just like I was dumb, at first thought p + q must be equal to n ....
Ke... In fact, we don't need to think too much about this question. We can use these N strings to assume that they are correct or incorrect and get the correct answer;
For example, if the full score is 0, assume that the I th is incorrect and compare a [I] with other strings. If there is no opposite string, we assume that it is true; the correct answer is the opposite;
Find the smallest Lexicographic Order;
If the number is zero, you can directly find the smallest Lexicographic Order;
If the full score and zero score are not 0, we assume that a [I] is correct. We can see that there are multiple full scores and zero scores under the current hypothesis, determine whether the conditions are met;
10.25 last simulation competition day1 answer