这题和第三章第一题一样,标准的无限01背包,直接把代码放进去就可以了,代码: / LANG: C ID: yylogoo1 PROG: inflate / #include int f[10001]; #define max(a, b) ((a)<(b)?(a):(b)) int main(void) { int m, n; int i, j; int a, b; freopen("inflate.in", "r", stdin); freopen("inflate.out", "w", stdout); scanf("%d%d", &m, &n); for(i = 0; i <n i scanfdd a b forj="b;" j="m;" j fj="max(f[j" - b a fj printfdn fm return code>