摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1423求最长公共递增子序列的长度。 1 #include 2 #include 3 #include 4 #define maxn 1000 5 using namespace std; 6 7 int d... 阅读全文
posted @ 2014-07-28 16:45 null1019 阅读(124) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1024状态转移方程: dp[j]=max(dp[j-1]+a[j],pre[j-1]+a[j]); 1 #include 2 #include 3 #include 4 #define maxn 100001... 阅读全文
posted @ 2014-07-28 15:56 null1019 阅读(219) 评论(1) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1088 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int g[200][200]; 7 int dp[200][200]; 8 int r,c; 9 int d... 阅读全文
posted @ 2014-07-28 14:59 null1019 阅读(126) 评论(0) 推荐(0) 编辑
摘要: http://poj.org/problem?id=1036题意:N个土匪,伸缩门的范围是K, 时间T, 伸缩门在【0, k】范围内变动,每个单位时间可以不变伸长或者缩短一个单位。给出每个最烦到达的时刻,取得的成就,和肥胖程度。即如果伸缩门的长度和土匪的肥胖程度一样,即得到成就。状态转移方程:dp[... 阅读全文
posted @ 2014-07-28 10:54 null1019 阅读(124) 评论(0) 推荐(0) 编辑