the_traveler @ 2023-09-20 17:43:36
#include<bits/stdc++.h>
using namespace std;
int n,x,a[10000000],s;
int main(){
cin>>n>>x;
for(int i=1;i<=n;i++){
cin>>a[i];
}
sort(a+1,a+1+n);
for(int i=1;i<=n;i++){
if(a[i]==a[i+1]){
a[i]=0;
s++;
}
}
sort(a+1,a+1+n);
cout<<a[s+x];
return 0;
}
by ZhongYuLin @ 2023-09-20 17:47:43
你要不看下题面??
by InterN_NOT_FOUND @ 2023-09-20 17:48:21
没说不能重复