Submission #66512

#TimeUsernameProblemLanguageResultExecution timeMemory
66512KLPPHindeks (COCI17_hindeks)C++14
50 / 50
266 ms7476 KiB
#include<iostream> #include<vector> #include<queue> #include<algorithm> #include<stdio.h> using namespace std; int main(){ int n; cin>>n; int arr[n]; for(int i=0;i<n;i++)cin>>arr[i]; sort(arr,arr+n); int h=0; for(int i=n-1;i>-1;i--){ if(arr[i]>=n-i)h=n-i; }cout<<h<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...