Submission #75043

#TimeUsernameProblemLanguageResultExecution timeMemory
75043charlies_mooHindeks (COCI17_hindeks)C++98
40 / 50
269 ms2548 KiB
#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 timeMemoryGrader output
Fetching results...