题意 给出n个物品,体积为w[i],现把其分成若干组,要求每组总体积<=W,问最小分组.(n<=18) 题解 一看以为是弱智题.(可能真的是,我太菜了) 然后跟walthou夸下海口:这么简单我做出来给你讲. 结果就被打脸了(对waithou说:我不会,自己看题解吧) 然后我就看了题解.. 设dp[i][j]为当前选i组已经选的情况为j的第i组的最小重量. 然后转移时,一个一个奶牛转移. 具体就是对于枚举的状态,如果dp[i][j]有不为INF,就枚举一个不属于j的x. 方程是 dp[i][j…