mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
26a72e347d
2100-2199
24 lines
394 B
C++
24 lines
394 B
C++
#include<iostream>
|
|
using namespace std;
|
|
int a[1001];
|
|
int main()
|
|
{
|
|
int t,n,m,i,j,k;
|
|
cin>>t;
|
|
while(t--)
|
|
{
|
|
scanf("%d%d",&n,&m);
|
|
for(i=1;i<=n;i++)
|
|
{
|
|
scanf("%d",&a[i]);
|
|
}
|
|
int sum=0;
|
|
for(i=1;i<=n;i++)
|
|
{
|
|
if(a[i]>a[m]) sum++;
|
|
}
|
|
cout<<sum<<endl;
|
|
}
|
|
return 0;
|
|
}
|