Submission #147707

#TimeUsernameProblemLanguageResultExecution timeMemory
147707nicolaalexandraHindeks (COCI17_hindeks)C++14
50 / 50
323 ms5616 KiB
#include <iostream> #include <algorithm> using namespace std; int v[500010]; int n,i; int main (){ cin>>n; for (i=1;i<=n;i++) cin>>v[i]; sort (v+1,v+n+1); for (i=n;i;i--) if (v[i] < n-i+1) break; cout<<n-i; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...