#include<iostream>
#include<cstdio>
#include<string>
#include<cstring>
#include<algorithm>
using namespace std;
const int maxn = ;
int n,x[maxn];
int cmd,cnt,ans,max_x;
int main(){
freopen("box.in","r",stdin);
freopen("box.out","w",stdout);
ios::sync_with_stdio(false);
cin>>n;
for(int i = ;i <= n;i++){
cin>>cmd;
x[cmd]++;
max_x = max(max_x,cmd);
}
while(){
cnt = ;
for(int i = ;i <= max_x;i++){
while(x[i] && i >= cnt){
x[i]--;
cnt++;
}
}
if(!cnt) break;
ans += ;
}
cout<<ans;
return ;
}

最新文章

  1. Node.js 教程 06 - 函数
  2. 讲座:Influence maximization on big social graph
  3. 初始Python
  4. 短链(ShortURL)的Java实现
  5. elixir 高可用系列 - 目录
  6. C#常用的加密算法
  7. MongoDB (十一) MongoDB 排序文档
  8. What does the number on the visual studio solution icon represent?
  9. php 操作xml文件
  10. IOS的处理touch事件处理(按照手指的移动移动一个圆,开发环境用的ios7,storyboard)
  11. mysql5.5升级到5.7
  12. ASP.NET MVC下使用AngularJs语言(五):ng-selected
  13. gnu screen的用法
  14. python使用requests时报错requests.exceptions.SSLError: HTTPSConnectionPool
  15. ubuntu 14.04 添加、删除用户,修改用户名称,修改主机名
  16. MyEclipse WebSphere开发教程:WebSphere 7安装指南(一)
  17. eterm和easyfare的官网地址
  18. C++静态成员的应用
  19. PreEssentials与MFC集成使用
  20. HDU 1104 Remainder(BFS 同余定理)

热门文章

  1. Opencv step by step - 绘图
  2. 使用jQuery加载html页面到指定的div
  3. [转]MySQL5.5 my.cnf配置参考
  4. 用一个下午从零开始搭建一个基础lbs查询服务
  5. 从实用主义深入理解c++虚函数
  6. session放到mongo里边
  7. GridView的常规用法
  8. 第三章:模块加载系统(requirejs)
  9. Git 常用命令详解(二)
  10. Lucene 4.7 --高亮显示