上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 52 下一页
摘要: 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) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1176 1 #include 2 #include 3 #include 4 #define maxn 200000 5 #define ll __int64 6 using namespace std; 7... 阅读全文
posted @ 2014-07-27 19:53 null1019 阅读(113) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1165 1 #include 2 #include 3 #include 4 #define ll __int64 5 using namespace std; 6 7 ll A(ll m, ll n) 8... 阅读全文
posted @ 2014-07-27 18:47 null1019 阅读(96) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1203 1 #include 2 #include 3 #include 4 using namespace std; 5 6 int a[20000]; 7 double b[20000],dp[2000... 阅读全文
posted @ 2014-07-27 10:36 null1019 阅读(125) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1227在n个商店中建m个仓库,使各个商店到仓库的路程之和最小,商店到哪个仓库是有选择的,求路程之和最小。dp[i][j]为建i个仓库前j个商店。 1 #include 2 #include 3 #include... 阅读全文
posted @ 2014-07-26 11:17 null1019 阅读(108) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1244状态转移方程:dp[i][j]=max(dp[i][j-1],dp[i-1][j-a[i]]+sum[j]-sum[j-a[i]]);dp[i][j]为第i段第j个数。 1 #include 2 #incl... 阅读全文
posted @ 2014-07-25 19:05 null1019 阅读(134) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1257先找到一个拦截系统的最低值,然后遇到不可拦截的导弹,拦截系统数量加一。 1 #include 2 #include 3 #include 4 #define maxn 200000 5 using na... 阅读全文
posted @ 2014-07-25 15:30 null1019 阅读(121) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1355 1 #include 2 #include 3 #include 4 #include 5 #define maxn 10000 6 using namespace std; 7 8 struct... 阅读全文
posted @ 2014-07-25 14:32 null1019 阅读(117) 评论(0) 推荐(0) 编辑
上一页 1 ··· 22 23 24 25 26 27 28 29 30 ··· 52 下一页