Concurso

Problem Link

Solution by TioPatinhas100 pts

Code / Notes

#include <bits/stdc++.h>
using namespace std;
int main() {

    int N, K;
    cin >> N >> K;
    vector<int>A (N);
    for (auto &x : A) cin >> x;
    sort(A.begin(), A.end());
    cout << A[N-K];
}

Last updated 1 month, 3 weeks ago


« Back to problem