MESSAGE
DATE | 2015-03-04 |
FROM | Ruben Safir
|
SUBJECT | Subject: [LIU Comp Sci] Kanpsack problemi
|
From owner-learn-outgoing-at-mrbrklyn.com Wed Mar 4 11:55:15 2015 Return-Path: X-Original-To: archive-at-mrbrklyn.com Delivered-To: archive-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix) id 5CF38161191; Wed, 4 Mar 2015 11:55:15 -0500 (EST) Delivered-To: learn-outgoing-at-mrbrklyn.com Received: by mrbrklyn.com (Postfix, from userid 28) id 3BC9D1612E0; Wed, 4 Mar 2015 11:55:15 -0500 (EST) Delivered-To: learn-at-nylxs.com Received: from mailbackend.panix.com (mailbackend.panix.com [166.84.1.89]) by mrbrklyn.com (Postfix) with ESMTP id AC1C0161191 for ; Wed, 4 Mar 2015 11:54:51 -0500 (EST) Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 786C511F82; Wed, 4 Mar 2015 11:54:51 -0500 (EST) Received: by panix2.panix.com (Postfix, from userid 20529) id 6A3A933C7A; Wed, 4 Mar 2015 11:54:51 -0500 (EST) Date: Wed, 4 Mar 2015 11:54:51 -0500 From: Ruben Safir To: jose.rodriguez-at-liu.edu Subject: [LIU Comp Sci] Kanpsack problemi Message-ID: <20150304165451.GA24491-at-panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Sender: owner-learn-at-mrbrklyn.com Precedence: bulk Reply-To: learn-at-mrbrklyn.com
This code is really confusing me
why is this +1
int size[NUM_ITEM_TYPES] = {7,8,9,11,13,14,16,19,21,23}; int value[NUM_ITEM_TYPES] = {4,5,6,7,8,9,100,11,180,13};
int max_value[MAX_CAPACITY + 1]; int item_index[MAX_CAPACITY + 1];
thanks
ruben
|
|