摘要:
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(& 阅读全文