Cod sursa(job #1793602)
Utilizator | Data | 31 octombrie 2016 11:20:56 | |
---|---|---|---|
Problema | Statistici de ordine | Scor | 100 |
Compilator | cpp | Status | done |
Runda | Arhiva educationala | Marime | 0.17 kb |
#include <bits/stdc++.h>
int n,i=1,k,v[3000001];std::ifstream f("sdo.in");main(){f>>n>>k;for(;i<=n;i++)f>>v[i];std::nth_element(v+1,v+k,v+n+1);std::ofstream("sdo.out")<<v[k];}