摘要: http://poj.org/problem?id=1276才开始自己写了一下转换成01背包的做法,直接tle。。计算一下就知道会tle了。然后写了一下二进制思想的方法,终于A了。。。背包好久没看了,自己还是不是很扎实啊View Code #include <iostream>#include <cstdio>#include <cstring>#define maxn 100007#define N 11using namespace std;int f[maxn];int c[N],b[N];int V,n,m;void zb(int c,int w,i 阅读全文
posted @ 2012-04-26 23:22 E_star 阅读(180) 评论(0) 推荐(0) 编辑