最少拦截系统
来源:互联网 发布:http 数据库 编辑:程序博客网 时间:2024/05/17 17:59
#include <iostream>using namespace std;int a[30005];int n;void init(){ while(cin>>n) { int k=0; for(int i=0;i<n;i++) { int x; cin>>x; if(i==0) a[k++]=x; else { int index = -1; int minx = 0x7fffffff; for(int j=0;j<k;j++) { if(a[j]>x&&a[j]-x<minx) {index=j;minx = a[j]-x;} } if(index==-1) a[k++]=x; else a[index]=x; } } cout<<k<<endl; }}int main(){init();return 0;}
- HDU1257最少拦截系统
- HDOJ_1257_最少拦截系统
- ACM_ZJUT_1099_最少拦截系统
- ZJUT1099 最少拦截系统
- 最少拦截系统!!
- 最少拦截系统
- HDU_1257最少拦截系统
- 最少拦截系统
- 最少拦截系统
- hdu 最少拦截系统
- hdu1257最少拦截系统
- 最少拦截系统
- hdu1257 最少拦截系统
- hdu1257 最少拦截系统
- 最少拦截系统
- HDU1257:最少拦截系统
- HDU1257--最少拦截系统
- 最少拦截系统
- C/C++中关于时间的函数 ctime()
- struts2 标签对指定的元素集合排序
- GDCPC2012 summary By Troy@SCAU_Yes_Angry_Teletubbies
- android 权限
- Informatica Notes
- 最少拦截系统
- 取得Window系统的当前用户
- 饿汉式、懒汉式singleton模式
- 由于CSDN小便疯狂无耻删贴行为我决定远离CSDN
- 20个Linux防火墙应用技巧
- 第一个SSH实例以及详细的说明---------代码优化以及数据库连接池
- JAVA中extends 与implements的区别
- 哈希表及其常用算法(代码实现)
- dom4j xml读写修改等操作