include[HTML_REMOVED]
using namespace std;
void sort(int a[],int low,int high)
{
if (low>=high)
return;
int i=low-1,j=high+1,x=a[low+high>>1];
while(i[HTML_REMOVED]x);
if(i<j)
{
swap(a[i],a[j]);
}
}
sort(a,low,j);
sort(a,j+1,high);
}
int main()
{
int m,n;
scanf(“%d%d”,&m,&n);
int a[m];
for(int i=0;i<m;i++)
{
scanf(“%d”,&a[i]);
}
sort(a,0,m-1);
printf(“%d”,a[n-1]);
return 0;
}