Submission #237793

# Submission time Handle Problem Language Result Execution time Memory
237793 2020-06-08T18:56:44 Z marlicu Hindeks (COCI17_hindeks) C++14
25 / 50
104 ms 5624 KB
#include <bits/stdc++.h>

using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    int n;
    cin >> n;

    vector <int> v;
    v.resize(n);

    for (int i = 0; i < n; i++) {
        cin >> v[i];
    }

    sort(v.begin(), v.end());
    reverse(v.begin(), v.end());

    int t = 0;
    while (v[t] >= t) t++;

    cout << t << '\n';

    return 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 5 ms 384 KB Output isn't correct
2 Correct 4 ms 384 KB Output is correct
3 Incorrect 5 ms 384 KB Output isn't correct
4 Incorrect 4 ms 384 KB Output isn't correct
5 Correct 5 ms 384 KB Output is correct
6 Incorrect 5 ms 384 KB Output isn't correct
7 Correct 7 ms 384 KB Output is correct
8 Correct 24 ms 1280 KB Output is correct
9 Incorrect 104 ms 5624 KB Output isn't correct
10 Correct 53 ms 3072 KB Output is correct