hdoj 1257
来源:互联网 发布:js设置按钮禁用 编辑:程序博客网 时间:2024/06/05 23:58
http://acm.hdu.edu.cn/showproblem.php?pid=1257
#include <iostream>using namespace std;#define MAX 10000int sys;//当前系统个数int cur[MAX];//当前各个系统可以应付的高度int h[MAX];//当前各个导弹的高度int main(){ int n,i,j; while (scanf("%d",&n)!=EOF) { sys=1; for(i=0;i<n;i++) { scanf("%d",&h[i]);//读取当前导弹高度 for (j=0;j<sys;j++) { if (cur[j] > h[i])//查询当前系统是否可以应付当前导弹 { cur[j] = h[i]; break; } } if (j==sys)//没有能打到当前导弹的系统,得增加一个 cur[sys++]=h[i]; } printf("%d\n",sys-1); } return 0;}
- hdoj 1257
- hdoj 1257
- hdoj 1257
- hdoj 1257
- HDOJ 1257
- hdoj 1257
- HDOJ 1257 LIS
- HDOJ
- hdoj
- hdoj
- HDOJ
- hdoj 1257 最少拦截系统
- hdoj 1257 最少拦截系统
- HDoj-1257-最少拦截系统
- HDOJ 最少拦截系统 1257
- HDOJ 1257 最少拦截系统
- HDOJ 1257 最少拦截系统
- hdoj 1257最少拦截系统
- 字符编码简介:ASCII,Unicode,UTF-8,GB2312
- hdoj 1241 Oil Deposits
- C# 5.0新特性介绍
- 14个值得推荐的个人提升方法
- 简单修复J-Link v7、v8固件损坏
- hdoj 1257
- hdoj 2037
- linux shell中的单引号与双引号的区别(看完就不会有引号的疑问了)
- 访问者模式(Visitor)
- hdoj 2054
- passthru驱动安装
- 查询Blocking脚本
- 输入输出
- aix下oracle定时自动备份