hdu 1257 最少拦截系统
来源:互联网 发布:豆瓣电影评论数据集 编辑:程序博客网 时间:2024/06/10 05:58
。。。不懂为什么这题是DP
#include <cstdio>#include <cstring>#include <iostream>using namespace std;int const MAXN = 100010;int a[MAXN];inline int Max(int a,int b){ return a>b?a:b;}int main(){ int n; while(~scanf("%d",&n)){ for(int i = 1;i <= n;i++){ scanf("%d",&a[i]); } int cnt = 0; for(int i = 1;i <= n;i++){ int m = a[i]; if(m > 0){ for(int j = i + 1;j <= n;j++){ if(m > a[j] && a[j]){ m = a[j]; a[j] = 0; cnt++; } } } } printf("%d\n",n - cnt); } return 0;}/*820 16 15 16 13 10 14 102*/
0 0
- hdu 1257 最少拦截系统
- 最少拦截系统 hdu 1257
- HDU 1257 最少拦截系统
- HDU 1257 最少拦截系统
- HDU 1257 最少拦截系统
- hdu 1257 最少拦截系统
- HDU 1257 最少拦截系统
- hdu 1257 最少拦截系统
- HDU 1257 最少拦截系统
- hdu 1257 最少拦截系统
- hdu 1257 最少拦截系统
- hdu 1257 最少拦截系统
- hdu 1257 最少拦截系统
- HDU 1257 最少拦截系统
- HDU 1257 最少拦截系统
- HDU 1257 最少拦截系统
- hdu 1257 最少拦截系统
- hdu 1257 最少拦截系统
- 面向对象与面向过程
- JavaWeb---Jsp的其他内置对象
- 环境变量
- Task和activity的lauchMode
- codeforce 259B 第二场 最新题解 (找规律)
- hdu 1257 最少拦截系统
- buffer cache 和shared pool 详解(之三,shared pool原理)
- Eclipse的汉化
- JavaWeb---Cookie的使用
- POJ3061 Subsequence
- Nginx、LVS及HAProxy负载均衡软件的优缺点详解
- tomcat7+nginx+memcached 配置tomcat 集群以及负载均衡
- ZOJ-3508-The War
- JS输出HTML串最快的方法