HDU 1171 Big Event in HDU 多重背包
摘要:
这题是我第一次写多重背包,1RE,1WA,#include<stdio.h>#include<string.h>int n,v[55],num[55],dp[250000],sum,all;int max( int a,int b ){ return a > b ? a : b;}int main( ){ while( scanf( "%d",&n ),n > 0 ) { sum = 0; for( int i = 0; i < n; ++i ) scanf( "%d%d",&v[i],& 阅读全文
posted @ 2011-05-17 23:47 LeeBlog 阅读(265) 评论(0) 推荐(0) 编辑