Submission #147583

#TimeUsernameProblemLanguageResultExecution timeMemory
147583SeekingOblivionHindeks (COCI17_hindeks)C++14
50 / 50
317 ms2300 KiB
///#include<fstream> #include<algorithm> #include<iostream> #define fin cin #define fout cout using namespace std; //ifstream fin("date.in"); //ofstream fout("date.out"); int i,n,v[500010],sol; int main() { fin>>n; for(i=1;i<=n;i++) fin>>v[i]; sort(v+1,v+n+1); for(i=1;i<=n;i++) sol=max(sol,min(n-i+1,v[i])); fout<<sol; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...