poj2533
来源:互联网 发布:烈火封神翅膀进阶数据 编辑:程序博客网 时间:2024/05/01 20:30
#include <iostream>#include <cstdio>#include <cstring>#include <climits>using namespace std;int n,a[1001],dp[1001];int solve(){ for(int i=1;i<=n;++i) dp[i] = 1; for(int i=2;i<=n;++i) for(int j=1;j<i;++j) if(a[i]>a[j]) dp[i]=max(dp[i],dp[j]+1); int maxn=INT_MIN; for(int i=1;i<=n;++i) maxn=max(maxn,dp[i]); return maxn;}int main(){ scanf("%d",&n); for(int i=1;i<=n;++i) scanf("%d",&a[i]); printf("%d\n",solve()); return 0;}
0 0
- poj2533
- POJ2533
- poj2533
- poj2533
- poj2533
- POJ2533
- poj2533
- POJ2533
- poj2533
- poj2533--LIS
- poj2533 LongestOrderedSubsequence
- poj2533(LIS)
- poj2533 LIS
- POJ2533(LIS)
- poj2533解题报告
- poj2533解题报告
- poj2533 简单DP LIS
- poj2533(最长递增序列)
- uCOS-II移植到STM32上的详细步骤
- Android开发艺术Activity生命周期
- Vijos P1008 篝火晚会(组合数学,置换群)
- Leetcode 213. House Robber II (Medium) (cpp)
- java8之Stream语法详解
- poj2533
- 2015年最新BigD牛魔王UI设计视频教程
- LeetCode进阶之路(Rotate List)
- 移动端web页面开发中遇到的三个“小坑”
- react on es6+
- Linux下TCP编程的注意事项-陈硕《网络编程实战》总结
- solr初用 修改配置
- nexus 3 maven 私服搭建
- {分享}《Matrix67:趣题:非常具有启发性的概率问题》