# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147583 | SeekingOblivion | Hindeks (COCI17_hindeks) | C++14 | 317 ms | 2300 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
///#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++)
sol=max(sol,min(n-i+1,v[i]));
fout<<sol;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |