# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147576 | Ruxandra985 | Hindeks (COCI17_hindeks) | C++14 | 118 ms | 2296 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 <cstdio>
#include <algorithm>
using namespace std;
int v[500010];
int main()
{
int n,i,h;
scanf ("%d",&n);
for (i=1;i<=n;i++)
scanf ("%d",&v[i]);
sort ( v + 1, v + n + 1);
for (h = n ; h ; h --){
if (v[h] < n - h + 1 )
break;
}
printf ("%d" , n - h);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |