version 1.2, 2005/02/16 07:17:25
|
version 1.3, 2005/02/16 07:19:57
|
|
|
backpack knapsackOne; | backpack knapsackOne; |
| |
knapsackOne.initBackpack(25,200); // 5 total items, 17 total weight | knapsackOne.initBackpack(25,200); // 5 total items, 17 total weight |
knapsackOne.packitem(70,70); |
|
knapsackOne.packitem(76,76); |
knapsackOne.putitem(70,70); |
knapsackOne.packitem(55,55); |
knapsackOne.putitem(76,76); |
knapsackOne.packitem(17,17); |
knapsackOne.putitem(55,55); |
knapsackOne.packitem(70,70); |
knapsackOne.putitem(17,17); |
knapsackOne.packitem(77,77); |
knapsackOne.putitem(70,70); |
knapsackOne.packitem(52,52); |
knapsackOne.putitem(77,77); |
knapsackOne.packitem(81,81); |
knapsackOne.putitem(52,52); |
knapsackOne.packitem(11,11); |
knapsackOne.putitem(81,81); |
knapsackOne.packitem(31,31); |
knapsackOne.putitem(11,11); |
knapsackOne.packitem(57,57); |
knapsackOne.putitem(31,31); |
knapsackOne.packitem(47,47); |
knapsackOne.putitem(57,57); |
knapsackOne.packitem(93,93); |
knapsackOne.putitem(47,47); |
knapsackOne.packitem(53,53); |
knapsackOne.putitem(93,93); |
knapsackOne.packitem(83,83); |
knapsackOne.putitem(53,53); |
knapsackOne.packitem(33,33); |
knapsackOne.putitem(83,83); |
knapsackOne.packitem(1,1); |
knapsackOne.putitem(33,33); |
knapsackOne.packitem(59,59); |
knapsackOne.putitem(1,1); |
knapsackOne.packitem(29,29); |
knapsackOne.putitem(59,59); |
knapsackOne.packitem(33,33); |
knapsackOne.putitem(29,29); |
knapsackOne.packitem(78,78); |
knapsackOne.putitem(33,33); |
knapsackOne.packitem(79,79); |
knapsackOne.putitem(78,78); |
knapsackOne.packitem(37,37); |
knapsackOne.putitem(79,79); |
knapsackOne.packitem(26,26); |
knapsackOne.putitem(37,37); |
knapsackOne.packitem(83,83); |
knapsackOne.putitem(26,26); |
|
knapsackOne.putitem(83,83); |
|
|
|
|
knapsackOne.store_item_array(); | knapsackOne.store_item_array(); |
| |
| |