void bag01(int cost,int weight)
{
for(i=v;i>=cost;i--)
if(dp[i]
完全背包
void complete(int cost,int weight)
{
for(i=cost;i<=v;i++)
if(dp[i]
多重背包
void multiply(int cost,int weight,int amount)
{
if(cost*amount>=v)
complete(cost,weight);
else{
k=1;
while(k