杨俊cumt

导航

2010年9月13日 #

动态规划(背包问题)

摘要: public class BagProblem {public static void main(String[] arg){//背包承受的重量final int MAX_WEIGHT = 8;final int MIN_WEIGHT = 1;//value决定当前的价值 int[] value = new int[MAX_WEIGHT+1];//item记录选的是谁int[] item = ne... 阅读全文

posted @ 2010-09-13 10:08 杨俊cumt 阅读(138) 评论(0) 推荐(0) 编辑