# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
147818 | mariadinca | Hindeks (COCI17_hindeks) | C++14 | 322 ms | 5624 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 <iostream>
#include <algorithm>
using namespace std;
int n, i, scor[500001], f[100001];
int main(){
cin>>n;
for(i=1;i<=n;i++){
cin>>scor[i];
}
sort(scor+1, scor+n+1);
for(i=n;i>=0;i--)
if(scor[i] < n-i+1){
cout<<n-i;
return 0;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |