Submission #75029

#TimeUsernameProblemLanguageResultExecution timeMemory
75029charlies_mooHindeks (COCI17_hindeks)C++98
15 / 50
271 ms7648 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) { h=i; break; } } cout<<h; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...