fw才看

Adolf Hitler  •  10个月前


include <bits/stdc++.h>

using namespace std;

bool cmp(int x,int y){

return x<y;

} int main() {

int num[10000], n,k;
scanf("%d %d", &n,&k);
for (int i = 0; i < n; i++) {
	scanf("%d", &num[i]);
}
sort(num,num+n,cmp);
cout<<num[k-1];
return 0;

}


评论:

请先登录,才能进行评论