Lang:G++
Edit12345678910111213#include<stdio.h>#include<algorithm>using namespace std;int in[1000003];int main(){int a,b;scanf("%d%d",&a,&b);for(int i=0;i<a;i++)scanf("%d",&in[i]);sort(in,in+a);printf("%d\n",in[b-1]);return 0;}