csu 1578: Opening Ceremony(DP)
来源:互联网 发布:如何查看域名被劫持 编辑:程序博客网 时间:2024/04/27 18:40
#include<cstdio> #include<cstring> #include<algorithm> using namespace std; int a[100005]; int dp[100005]; int main() { int n; while(scanf("%d",&n)==1) { for(int i=1;i<=n;i++) scanf("%d",&a[i]); sort(a+1,a+1+n); dp[0]=0; for(int i=1;i<=n;i++) { dp[i]=min(dp[i-1]+1,a[i]); } printf("%d\n",dp[n]); } return 0; }
0 0
- csu 1578: Opening Ceremony(DP)
- Opening ceremony
- Opening Ceremony
- ASPM Opening Ceremony
- SOJ.Opening Ceremony
- Sicily 周赛 Opening Ceremony
- Sicily 13910. Opening Ceremony
- CSU1578: Opening Ceremony
- Opening Ceremony----思维题
- CSU 1791 ceremony
- NCPC 2014 Problem E Opening Ceremony Problem ID: ceremony
- The Opening Ceremony of my blog
- CF 2014 Nordic Collegiate Programming Contest E Opening Ceremony
- CSU 1529 Equator DP
- CSU 1529: Equator(dp)
- CSU 1206 概率DP
- dp --- CSU 1547: Rectangle
- CSU 1963 斜率DP
- Tomcat配置的几点说明
- Tomcat性能调优方案
- 2811:打鱼还是晒网
- 如何找到mysql安装目录及其目录下的data文件夹
- 如何配置jboss
- csu 1578: Opening Ceremony(DP)
- Restore IP Addresses
- POJ 1258Agri-Net Prim算法模型
- 【转】C# 线程池
- 并查集模板
- VS2008单元测试
- csu 1577: Dice Game
- 算法导论笔记:13-02红黑树插入
- WINDOWS开机自启动数字键盘的方法