Submission #147580

#TimeUsernameProblemLanguageResultExecution timeMemory
147580SeekingOblivionHindeks (COCI17_hindeks)C++14
40 / 50
318 ms2272 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++) if(n-i>=v[i]) sol=n-i; fout<<sol; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...