http://acm.hdu.edu.cn/showproblem.php?pid=2148

View Code
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
int main()
{
    int t,n,l;
    int i;
    int s[1100];
    scanf("%d",&t);
    while(t--)
    {
        scanf("%d%d",&n,&l);
        for(i=1;i<=n;i++)
            scanf("%d",s+i);
        int ans=0;
        for(i=1;i<=n;i++)
            if(s[i]>s[l])
                ans++;
        printf("%d\n",ans);
    }
    return 0;
}

 

相关文章:

  • 2022-01-21
  • 2021-06-17
  • 2021-11-26
  • 2021-11-21
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-04
  • 2022-03-09
  • 2021-07-16
  • 2021-12-22
  • 2021-09-04
  • 2021-10-24
  • 2021-10-28
相关资源
相似解决方案