摘要:
简单完全背包。代码如下:#include <cstdio>#include <cstdlib>#include <cmath>#include <cstring>#include <iostream>#include <algorithm>#define MAXN 500#define INF 0x3ffffffusing namespace std;int E, F, N, W, dp[10005];struct Node{ int p, w; }e[MAXN+5];void c_bag(int x){ for (int 阅读全文