锘??xml version="1.0" encoding="utf-8" standalone="yes"?>四虎影视久久久免费,久久久无码精品亚洲日韩软件,国产成人综合久久综合http://m.shnenglu.com/huicpc0860/category/13827.htmlEverything has its history.zh-cnMon, 06 Sep 2010 02:05:22 GMTMon, 06 Sep 2010 02:05:22 GMT60hdu 3401 Tradehttp://m.shnenglu.com/huicpc0860/archive/2010/08/16/123627.htmlhuicpc0860huicpc0860Mon, 16 Aug 2010 13:40:00 GMThttp://m.shnenglu.com/huicpc0860/archive/2010/08/16/123627.htmlhttp://m.shnenglu.com/huicpc0860/comments/123627.htmlhttp://m.shnenglu.com/huicpc0860/archive/2010/08/16/123627.html#Feedback0http://m.shnenglu.com/huicpc0860/comments/commentRss/123627.htmlhttp://m.shnenglu.com/huicpc0860/services/trackbacks/123627.html#include <stdio.h>
#define N 2001
#define inf 10000000
#define max(a,b) ((a)>(b)?(a):(b))
int f[N][N],q[N],id[N];
int main(){
    
int t,n,maxp,w,ap,bp,as,bs;
    scanf(
"%d",&t);
    
while(t--){
        scanf(
"%d%d%d",&n,&maxp,&w);
        
for(int i=0;i<n;++i){
            scanf(
"%d%d%d%d",&ap,&bp,&as,&bs);
            
for(int j=0;j<=maxp;++j)f[i][j]=-inf;
            
if(i<=w)for(int j=0;j<=as;++j)f[i][j]=-ap*j;
            
if(i>0)for(int j=0;j<=maxp;++j)f[i][j]=max(f[i][j],f[i-1][j]);
            
if (i==0||i<=w) continue;
            
for(int j=0,l=0,r=-1;j<=maxp;++j){
                
int tmp=f[i-w-1][j]+j*ap;
                
while(l<=r&&q[r]<tmp)--r;
                q[
++r]=tmp,id[r]=j;
                
while(l<=r&&id[l]+as<j)++l;
                f[i][j]
=max(f[i][j],q[l]-j*ap);
            }

            
for(int j=maxp,l=0,r=-1;j>=0;--j){
                
int tmp=f[i-w-1][j]+j*bp;
                
while(l<=r&&q[r]<tmp)--r;
                q[
++r]=tmp,id[r]=j;
                
while(l<=r&&id[l]-bs>j)++l;
                f[i][j]
=max(f[i][j],q[l]-j*bp);
            }

        }

        
int ans=0;
        
for(int i=0;i<=maxp;++i)ans=max(ans,f[n-1][i]);
        printf(
"%d\n",ans);
    }

    
return 0;
}



huicpc0860 2010-08-16 21:40 鍙戣〃璇勮
]]>
hdu 3433 A Task Processhttp://m.shnenglu.com/huicpc0860/archive/2010/07/15/120470.htmlhuicpc0860huicpc0860Thu, 15 Jul 2010 12:26:00 GMThttp://m.shnenglu.com/huicpc0860/archive/2010/07/15/120470.htmlhttp://m.shnenglu.com/huicpc0860/comments/120470.htmlhttp://m.shnenglu.com/huicpc0860/archive/2010/07/15/120470.html#Feedback0http://m.shnenglu.com/huicpc0860/comments/commentRss/120470.htmlhttp://m.shnenglu.com/huicpc0860/services/trackbacks/120470.html#include <stdio.h>
#include 
<algorithm>
using namespace std;
int cas,tim,n,x,y,a[60],b[60],f[210];
int main(){
    scanf(
"%d",&cas);
    
for(int tim=0;tim<cas;){
        scanf(
"%d%d%d",&n,&x,&y);
        
for(int i=1;i<=n;i++)//涓嬫爣閲?寮濮?nbsp;
            scanf("%d%d",&a[i],&b[i]);
        
int l=0,r=a[1]*x+b[1]*y,m;
        
while(l<=r){
            m
=(l+r)>>1;
            
for(int i=1;i<=x;i++)f[i]=-999999999;
            f[
0]=0;
            
for(int i=1;i<=n;i++)
                
for(int v=x;v>=0;v--){
                    f[v]
+=m/b[i];//鏂板叆宸ヤ漢瑕佹洿鏂?nbsp;
                    for(int j=0;j<v;j++if (m>=(v-j)*a[i]) 
                        f[v]
=max(f[v],f[j]+(m-a[i]*(v-j))/b[i]);
                }

            
if(f[x]>=y)r=m-1;//鏈宸﹂艱繎 
            else l=m+1;
        }

        printf(
"Case %d: %d\n",++tim,l);
    }

    
return 0;
}



huicpc0860 2010-07-15 20:26 鍙戣〃璇勮
]]>
poj 2978 Colored stoneshttp://m.shnenglu.com/huicpc0860/archive/2010/05/18/115690.htmlhuicpc0860huicpc0860Tue, 18 May 2010 08:42:00 GMThttp://m.shnenglu.com/huicpc0860/archive/2010/05/18/115690.htmlhttp://m.shnenglu.com/huicpc0860/comments/115690.htmlhttp://m.shnenglu.com/huicpc0860/archive/2010/05/18/115690.html#Feedback0http://m.shnenglu.com/huicpc0860/comments/commentRss/115690.htmlhttp://m.shnenglu.com/huicpc0860/services/trackbacks/115690.html//鐘舵佸帇緙ヾp
#include 
<stdio.h>
#include 
<string.h>
int dp[101][6][160];

int max(int a, int b) {
    
return a > b ? a : b;
}

int main() {
    
int m, k;
    
while (scanf("%d%d"&m, &k), m || k) {
        memset(dp, 
0sizeof (dp));
        
int n = 1 << k, ans = 0, a;
        
for (int i = 1; i <= m; i++) {
            scanf(
"%d"&a);
            a
--;
            
for (int j = 0; j < k; j++)
                
for (int s = 0; s < n; s++)
                    
if ((s >> a)&1) {
                        
if (a == j) dp[i][j][s] = max(dp[i][j][s], dp[i - 1][j][s] + 1);
                        
else dp[i][j][s] = max(dp[i][j][s], dp[i - 1][j][s]);
                    } 
else {
                        dp[i][a][s 
| (1 << a)] = max(dp[i][a][s | (1 << a)], dp[i - 1][j][s] + 1);
                        dp[i][j][s] 
= max(dp[i][j][s], dp[i - 1][j][s]);
                    }
        }
        
for (int i = 0; i < k; i++)
            
for (int j = 0; j < n; j++)
                ans 
= max(ans, dp[m][i][j]);
        printf(
"%d\n", m - ans);
    }
    
return 0;
}



huicpc0860 2010-05-18 16:42 鍙戣〃璇勮
]]>
poj 2411 Mondriaan's Dreamhttp://m.shnenglu.com/huicpc0860/archive/2010/05/17/115596.htmlhuicpc0860huicpc0860Mon, 17 May 2010 08:11:00 GMThttp://m.shnenglu.com/huicpc0860/archive/2010/05/17/115596.htmlhttp://m.shnenglu.com/huicpc0860/comments/115596.htmlhttp://m.shnenglu.com/huicpc0860/archive/2010/05/17/115596.html#Feedback0http://m.shnenglu.com/huicpc0860/comments/commentRss/115596.htmlhttp://m.shnenglu.com/huicpc0860/services/trackbacks/115596.html#include <stdio.h>
#include 
<string.h>
const int N = 1 << 11;
long long x[N], y[N];
int n, m, t;

bool check(int x) {
    
while (x) {
        
if (x & 1) {
            x 
>>= 1;
            
if (x & 1)x >>= 1;
            
else return 0;
        } 
else x >>= 1;
    }
    
return 1;
}

bool judge(int now, int last) {
    
int tmp = t & (~last);
    
if ((now & tmp) == tmp && check(now - tmp))return 1;
    
return 0;
}

int main() {
    
while (scanf("%d%d"&n, &m), n || m) {
        
if ((n & 1&& (m & 1)) {
            puts(
"0");
            
continue;
        }
        
if (n < m)n ^= m, m ^= n, n ^= m;
        
int s = 1 << m;
        t 
= s - 1;
        
for (int i = 0; i < s; i++)y[i] = check(i);
        
for (int i = 1; i < n; i++) {
            
for (int j = 0; j < s; j++)
                
for (int k = 0; k < s; k++)
                    
if (judge(j, k))x[j] += y[k];
            memcpy(y, x, 
sizeof (x[0]) * s);
            memset(x, 
0sizeof (x[0]) * s);
        }
        printf(
"%lld\n",y[t]);
    }
    
return 0;
}



huicpc0860 2010-05-17 16:11 鍙戣〃璇勮
]]>
久久香蕉一级毛片| 伊人色综合九久久天天蜜桃| 九九精品99久久久香蕉| 午夜人妻久久久久久久久| 久久久久久毛片免费播放| 九九久久99综合一区二区| 久久露脸国产精品| 97久久天天综合色天天综合色hd| 99久久无码一区人妻| 久久婷婷是五月综合色狠狠| 国产精品一久久香蕉产线看 | 亚洲人成网站999久久久综合 | 亚洲中文久久精品无码ww16| 久久九九青青国产精品| 久久天天躁狠狠躁夜夜躁2014| 伊人久久大香线蕉精品| 久久精品国产久精国产一老狼| 久久精品国产精品亜洲毛片 | 99re这里只有精品热久久| 久久亚洲国产最新网站| 91久久香蕉国产熟女线看| 精品久久久噜噜噜久久久 | 精品久久777| 久久久久久久人妻无码中文字幕爆| 久久中文精品无码中文字幕| 久久精品国产精品亚洲精品| 精品久久久久久中文字幕人妻最新| 模特私拍国产精品久久| 亚洲精品美女久久久久99小说| 精品久久久久中文字| 国内精品久久久久久久涩爱| 91麻精品国产91久久久久| 久久中文娱乐网| 99久久伊人精品综合观看| 日本精品久久久久中文字幕| 精品精品国产自在久久高清| 亚洲精品高清国产一久久| 久久综合久久综合九色| 久久人人爽人爽人人爽av| 亚洲午夜无码AV毛片久久| 国内精品久久久久影院薰衣草|