#codefestival2015qualBb. [codefestival_2015_qualB_b]Grading
[codefestival_2015_qualB_b]Grading
Problem Statement
Mr. Takahashi is marking examination papers of his students. Unfortunately, he has forgotten the correct answer to a certain question.
students answered this question by an integer between and , inclusive. He has decided to assume the correct answer to be the integer if more than half of the students answered .
You are given the answers of the students to this question. If he is going to assume the correct answer to be some integer , print the value of . If he is unable to assume the correct answer to be any integer, print ?
.
Input
Input is given from Standard Input in the following format:
...
- The first line contains two space-separated integers and .
- The second line contains space-separated integers For each represents the answer of the student.
Output
If Mr. Takahashi is going to assume the correct answer to be some integer , print the value of in a single line. Otherwise, print ?
. Be sure to print a newline at the end of output.
Partial Points
Partial points may be awarded in this problem:
- points will be awarded for passing the test set satisfying ,
- Another points will be awarded for passing the test set without additional constraints.
入力例1
3 2
2 1 2
出力例1
2
入力例2
4 2
2 1 2 1
出力例2
?
入力例3
10 1
0 0 0 0 0 0 1 1 1 1
出力例3
0
入力例4
10 5
0 1 2 3 4 5 5 5 5 5
出力例4
?