# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
75043 | charlies_moo | Hindeks (COCI17_hindeks) | C++98 | 269 ms | 2548 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 <iostream>
#include <algorithm>
using namespace std;
int n,a[500001],h,j=1,count_;
bool cmp(int a,int b)
{
return a>b;
}
int main()
{
cin>>n;
for(int i=0;i<n;i++)
cin>>a[i];
sort(a,a+n,cmp);
for(int i=0;i<n;i++)
{
if(a[i]<i+1)
{
h=i;
break;
}
}
cout<<h;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |