- 咸鱼梦想家的鸡架泡饭
60分
- @ 2025-9-27 10:56:10
#include<bits/stdc++.h>
using namespace std;
struct th{
int t;
int h;
}a[1000007];
bool cmp(th x,th y){
return x.h>y.h;
}
int n,m;
int main(){
cin>>n>>m;
a[m].t=1;
for(int i=1;i<=n;i++) cin>>a[i].h;
sort(a+1,a+n+1,cmp);
for(int i=1;i<=n;i++){
if(a[i].t){
cout<<i;
break;
}
}
return 0;
}
1 条评论
-
zjy LV 6 @ 2025-9-27 12:20:33哪几个点错了,数据还在我手上
- 1
信息
- ID
- 6
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 2
- 标签
- (无)
- 递交数
- 17
- 已通过
- 3
- 上传者