![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
DP
CbdFocus
耐心是美德。
展开
-
hdu 1024 Max Sum Plus Plus//DP
#include #include #define N 1000010 #define inf 9999999 int dp[N], pre[N], num[N], max; int Max(int a, int b) { return a > b ? a : b; } int main() { int i, j; int n, m; while(scanf("%d%原创 2013-06-13 15:33:46 · 354 阅读 · 0 评论 -
Hdu 1003 max sum _DP
#include"iostream"// 很神奇的是如果全是负数不用单独考虑,也可AC #include"stdio.h" #include"algorithm" using namespace std; int a[100005]; int main() { int num,n,begin,end,sum,max,mark,i; int count=0; s原创 2013-06-13 15:33:24 · 359 阅读 · 0 评论 -
hdu 1003 Max Sum//DP
#include"iostream"// 很神奇的是如果全是负数不用单独考虑,也可AC #include"stdio.h" #include"algorithm" using namespace std; int a[100005]; int main() { int num,n,begin,end,sum,max,mark,i; int count=0; scanf("%d",&num);原创 2013-06-13 15:33:48 · 355 阅读 · 0 评论 -
hdu 1069 Monkey and Banana//DP
#include"iostream" #include"stdio.h" #include"algorithm" using namespace std; #define MAXN 32 struct NODE { int l,w,h,s; }node[MAXN*3]; int dp[MAXN*3]; bool cmp(NODE a,NODE b) { return a.l*a.w>b.l*b.w原创 2013-06-13 15:33:52 · 332 阅读 · 0 评论 -
mark一篇 //DP专题
http://www.cnblogs.com/183zyz/archive/2011/10/14/2212034.html原创 2013-06-13 15:33:33 · 319 阅读 · 0 评论 -
hdu 2577 How to Type //简单DP
#include"iostream" #include"string.h" using namespace std; int min (int a, int b) { return a } int main() { int i,num; int dp[105][2]; char str[105]; scanf("%d",&num); while(nu原创 2013-06-13 15:33:35 · 343 阅读 · 0 评论 -
hdu 3351 //大括号配对儿 DP
#include"iostream" #include"stdio.h" #include"algorithm" #include"string" using namespace std; int main() { int zuo,fanzhuan,i,len,count=1; string a; while(cin>>a) { if(a[0]=='-') break; zuo=0; fanzhu原创 2013-06-13 15:33:55 · 366 阅读 · 0 评论