2013年3月5日

HDU 2191 悼念512汶川大地震遇难同胞——珍惜现在,感恩生活

摘要: 题意:不解释。。。分析:裸的多重背包。AC代码: 1 #include<iostream> 2 using namespace std; 3 4 const int maxm=105; 5 int f[maxm],cost[maxm],val[maxm],num[maxm]; 6 int n,m; 7 8 int max(int a,int b){ 9 return a>b?a:b;10 }11 12 void CompletePack(int c,int v){13 int i;14 for(i=c;i<=m;i++)15 f[i]=max(f[i... 阅读全文

posted @ 2013-03-05 12:57 Acmer_Roney 阅读(194) 评论(0) 推荐(0) 编辑

导航