#T420. 期末成绩
期末成绩
Description
It's the end of the semester again, and Xiao Ming is facing another round of final exams.
After the exams, Xiao Ming received the class score sheet, which is sorted in order of student IDs. Xiao Ming wants to know how many classmates scored higher than him. Now, please help him count how many students have higher scores than his.
Input Format
The first line of input data is a positive integer T, representing the number of test cases. Following this, there are T test cases.
Each test case consists of two lines.
The first line contains two positive integers N and K (0 < N < 1000, 0 < K <= N), representing the total number of students on the score sheet and Xiao Ming's student ID, respectively.
The second line contains N integers Xi (0 <= Xi <= 100), representing the scores of each student in ascending order of student IDs. The first student has an ID of 1.
Output Format
For each test case, output a single line indicating how many students in the class have scores higher than Xiao Ming's.
```input1 1 3 2 81 72 63 ``` ```output1 1 ``` ```markdown ## SourceCodesOnline