Submission #147580

# Submission time Handle Problem Language Result Execution time Memory
147580 2019-08-30T07:23:24 Z SeekingOblivion Hindeks (COCI17_hindeks) C++14
40 / 50
318 ms 2272 KB
///#include<fstream>
#include<algorithm>
#include<iostream>
#define fin cin
#define fout cout
using namespace std;
//ifstream fin("date.in");
//ofstream fout("date.out");
int i,n,v[500010],sol;
int main()
{
    fin>>n;
    for(i=1;i<=n;i++) fin>>v[i];
    sort(v+1,v+n+1);
    for(i=1;i<=n;i++)
        if(n-i>=v[i]) sol=n-i;
    fout<<sol;
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Incorrect 2 ms 256 KB Output isn't correct
3 Correct 2 ms 256 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 7 ms 376 KB Output is correct
8 Correct 60 ms 632 KB Output is correct
9 Correct 318 ms 2272 KB Output is correct
10 Incorrect 160 ms 1372 KB Output isn't correct