#include <iostream>
#include <algorithm>
using namespace std;
bool cmp(int a, int b){
return a>b;
}
int main()
{
int n;
scanf("%d",&n);
int day[n+2];
for(int i=1;i<=n;i++){
scanf("%d",&day[i]);
}
sort(day+1,day+n+1,cmp);
int i;
for(i=1;i<=n;i++){
if(i>=day[i] ){
//printf("%d",i-1);
break;
}
}
printf("%d",i-1);
return 0;
}
1060. 爱丁顿数(25)
最新推荐文章于 2020-05-14 20:53:28 发布