摘要: 简单完全背包。代码如下:#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 阅读全文
posted @ 2012-05-03 19:50 沐阳 阅读(306) 评论(0) 推荐(0) 编辑