随笔分类 -  【DP的优化】

【POJ】3017 Cut the Sequence
摘要:1 #include<cstdio> 2 #define MAXN 100010 3 #define MIN(a,b) ((a)<(b)?(a):(b)) 4 typedef __int64 LL; 5 LL limit,a[MAXN],dp[MAXN]; 6 int n,Q[MAXN]; 7 LL DoIt() 8 { 9 LL sum;10 int i,j,k,front,rear;11 for(i=1;i<=n;i++)12 {13 if(a[i]>limit)14 return -1;15 }16 ... 阅读全文
posted @ 2012-07-13 20:50 DrunBee 阅读(477) 评论(0) 推荐(0)