背包问题求解

上传者: zy1640168720 | 上传时间: 2019-12-21 22:25:52 | 文件大小: 36KB | 文件类型: zip
背包问题的解法及其相关的代码 假设有一个能装入总体积为T的背包和n件体积分别为w1 , w2 , … , wn 的物品,能否从n件物品中挑选若干件恰好装满背包,即使w1 +w2 + … + wn=T,要求找出所有满足上述条件的解。例如:当T=10,各件物品的体积{1,8,4,3,5,2}时,可找到下列4组解:(1,4,3,2),(1,4,5),(8,2),(3,5,2)。

文件下载

资源详情

[{"title":"( 29 个子文件 36KB ) 背包问题求解","children":[{"title":"背包问题Bag","children":[{"title":"manifest.mf <span style='color:#111;'> 85B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"Bag","children":[{"title":"Stack.java <span style='color:#111;'> 344B </span>","children":null,"spread":false},{"title":"Bag1.java <span style='color:#111;'> 2.01KB </span>","children":null,"spread":false},{"title":"Bag2.java <span style='color:#111;'> 1.16KB </span>","children":null,"spread":false},{"title":"Knapsack0.java <span style='color:#111;'> 2.09KB </span>","children":null,"spread":false},{"title":"Bag3.java <span style='color:#111;'> 11.67KB </span>","children":null,"spread":false},{"title":"SeqStack.java <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"Bag.java <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"Bag0.java <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false},{"title":"Bag4.java <span style='color:#111;'> 10.96KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"build","children":[{"title":"empty","children":null,"spread":false},{"title":"classes","children":[{"title":".netbeans_automatic_build <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"Date3","children":[{"title":"liti","children":null,"spread":false}],"spread":true},{"title":"Bag","children":[{"title":"Bag4.class <span style='color:#111;'> 2.35KB </span>","children":null,"spread":false},{"title":"Bag.class <span style='color:#111;'> 1.73KB </span>","children":null,"spread":false},{"title":"Bag3.class <span style='color:#111;'> 2.98KB </span>","children":null,"spread":false},{"title":"Stack.class <span style='color:#111;'> 343B </span>","children":null,"spread":false},{"title":"Bag2.class <span style='color:#111;'> 1.23KB </span>","children":null,"spread":false},{"title":"SeqStack.class <span style='color:#111;'> 1.31KB </span>","children":null,"spread":false},{"title":"Bag1.class <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false},{"title":"Bag0.class <span style='color:#111;'> 1.36KB </span>","children":null,"spread":false},{"title":"Knapsack0.class <span style='color:#111;'> 2.10KB </span>","children":null,"spread":false}],"spread":true}],"spread":true},{"title":"built-jar.properties <span style='color:#111;'> 92B </span>","children":null,"spread":false}],"spread":true},{"title":"test","children":null,"spread":false},{"title":"dist","children":[{"title":"Bag.jar <span style='color:#111;'> 12.50KB </span>","children":null,"spread":false}],"spread":true},{"title":"build.xml <span style='color:#111;'> 3.62KB </span>","children":null,"spread":false},{"title":"nbproject","children":[{"title":"genfiles.properties <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 2.29KB </span>","children":null,"spread":false},{"title":"private","children":[{"title":"private.xml <span style='color:#111;'> 211B </span>","children":null,"spread":false},{"title":"private.properties <span style='color:#111;'> 97B </span>","children":null,"spread":false}],"spread":true},{"title":"build-impl.xml <span style='color:#111;'> 47.88KB </span>","children":null,"spread":false},{"title":"project.xml <span style='color:#111;'> 511B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明