Concurso
Problem LinkSolution by Mr.Olimpia — 100 pts
Code / Notes
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
int k;
cin >> n >> k;
vector<int>notas(n);
for(int i=0; i<n; i++){
cin >> notas[i];
}
sort(notas.begin(), notas.end());
cout << notas[n-k];
}
Last updated 1 month, 3 weeks ago