摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2191 转化为01背包问题,只是将原来的放或不放第i件物品改为放几件第i件物品。#include<cstdio>#include<cstring>#definemax(a,b)a>b?a:busingnamespacestd;intdp[105];structpage{intweight;intvalue;intnum;}pg[105];intmain(){intt,n,m,i,j,k;scanf("%d",&t);while(t--){scanf(& 阅读全文
posted @ 2011-11-14 23:14 追逐. 阅读(246) 评论(0) 推荐(0) 编辑