Submission #147818

#TimeUsernameProblemLanguageResultExecution timeMemory
147818mariadincaHindeks (COCI17_hindeks)C++14
50 / 50
322 ms5624 KiB
#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 timeMemoryGrader output
Fetching results...