摘要: 背包容量M=8;物品效益值(P1,P2,P3,P4,P5,P6)=(10,18,40,56,30,15); (W1,W2,W3,W4,W5,W6)=(1,2,5,8,5,3);P1/W1>P2/W2>P3/w3>P4/W4>P5/W5>P6/W6P,W分别用一个数组表示,返回解序列X。 1 pac... 阅读全文
posted @ 2016-01-10 21:47 YoZane 阅读(749) 评论(0) 推荐(0) 编辑
摘要: 1、二分检索: 1 package divideAndConquer; 2 3 public class BINSRCH { 4 int j=-1; 5 BINSRCH(){ 6 int[] a={4,7,3,1,5,6,0,8,9,2}; 7 bi... 阅读全文
posted @ 2016-01-10 15:32 YoZane 阅读(568) 评论(0) 推荐(0) 编辑