结果是拿1 3 5个
model:
sets:
item/1..5/:weight,value,x;
endsets
data:
weight=3 4 3 4 6;
value=12 12 9 16 30;
enddata
max=@sum(item:value*x);
@sum(item:weight*x)
结果是拿1 3 5个
model:
sets:
item/1..5/:weight,value,x;
endsets
data:
weight=3 4 3 4 6;
value=12 12 9 16 30;
enddata
max=@sum(item:value*x);
@sum(item:weight*x)