1.零钱兑换问题...AC100% /** * 零钱兑换 * AC100 */ public static int weight(int[] weights, int total) { //dp[i]表示凑够i元需要的最小的金币数量... int[] dp = new int[total + 1]; //dp //给dp[1..]元素赋值为Integer.MAX_VALUE>>1,dp[0]=0 //为什么要设置为Integer.MAX_VALUE>>1呢...