-->
当前位置:首页 > 题库

PROGRAMMING:Statistics (Cixi, 2008)

Luz5年前 (2021-05-10)题库404
After the end of the mathematics competition, each class teacher is very eager to know the number of their class in the top n of the year. So, the dean of education invited Gao Yang of the information science interest group to help, and asked to write a program. As long as he told the computer to check the class k and the top n, and then input the scores of M students, the computer would count the number of class k in the top n( Suppose the total score of each student is different)
###Input format:
Input total m + 1 lines
The three integers in the first line are m, K and N, respectively, which means that there are m students in the whole year. The number of class k in the top n of the whole year is to be counted( M≤1000,K≤20,N≤M)
The next M line is the class and grade of M students, separated by a space.
###Output format:
Output a total of one line,
It means the number of class k in the top n of the year.
###Input example:
```in
7 2 5
2 65
3 90
9 100
8 64
2 66
2 80
4 84
```
###Output example:
```out
two
```






answer:If there is no answer, please comment