#P6691. 选择题
选择题
Description
This is a multiple-choice question with options, and the statement of each option is unique. The content of option has the following form:
- Option is true / false.
Xiao L thinks that the answer to this kind of question may not be unique, so he wants to ask: how many valid answers does this question have (it is allowed that all options are true or all options are false). He also wants to know, among all these answers, how many true options the answer with the most true options has, and how many true options the answer with the fewest true options has.
Of course, if this question has no valid answer, you can directly reply to Xiao L with No answer.
Input Format
The first line contains a positive integer , representing the number of options.
The next lines each contain two integers , describing an option. When , it means the content of this option is Option is true; when , it means the content of this option is Option is false.
Output Format
If no answer satisfies this multiple-choice question, output No answer.
Otherwise, output three lines, each containing a positive integer: the number of valid answers, and the numbers of true options in the valid answer with the most true options and in the valid answer with the fewest true options, respectively. The number of valid answers should be taken modulo .
4
2 1
4 0
1 1
2 0
2
3
1
10
4 1
7 0
2 0
3 1
7 1
5 0
9 1
10 1
8 0
1 1
No answer
Hint
For Sample 1, there are valid answers in total:
- Options are true.
- Option is true.
Among them, the answer with the most true options has true options, and the answer with the fewest true options has true option.
Constraints
For of the testdata, .
For of the testdata, .
For of the testdata, .
For of the testdata, , , , .
Translated by ChatGPT 5
京公网安备 11011102002149号