Cod sursa(job #915538)
Utilizator | Data | 15 martie 2013 09:47:01 | |
---|---|---|---|
Problema | Statistici de ordine | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.32 kb |
#include<fstream>
#include<algorithm>
using namespace std;
ifstream f("sdo.in");
ofstream g("sdo.out");
#define max_n 3000010
int n , k , V[max_n];
void read(){
f>>n>>k;
for(int i = 1 ; i <= n ; i++){
f>>V[i];
}
}
int main(){
read();
sort( V+1 , V+n+1 );
g<<V[k];
return 0;
}