Mai intai trebuie sa te autentifici.
Cod sursa(job #1282126)
Utilizator | Data | 3 decembrie 2014 22:59:07 | |
---|---|---|---|
Problema | Statistici de ordine | Scor | 70 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.44 kb |
#include <iostream>
#include <fstream>
#include <algorithm>
#define FIN "sdo.in"
#define FOUT "sdo.out"
#define MAXN 3000005
typedef unsigned int uint;
using namespace std;
uint arr[ MAXN ],
n,
k;
int main() {
ifstream fin( FIN );
ofstream fout( FOUT );
fin>>n>>k;
for(uint i = 1; i <= n; i++) fin>>arr[ i ];
sort(arr + 1, arr + n + 1);
fout<<arr[ k ];
return(0);
};