IT民工
加油!
摘要: http://www.rqnoj.cn/Problem_98.html裸的多重背包#include<cstdio>#include<cstring>#include<algorithm>using namespace std;int N, V;const int MAXV = 1 << 9;int f[MAXV];void ZeroOnePack( int f[], int C, int W){ int v; for( v = V; v >= C; v --) f[v] = max( f[v], f[v - C] + W);}void Co 阅读全文
posted @ 2012-07-20 18:02 找回失去的 阅读(178) 评论(0) 推荐(0) 编辑
摘要: http://www.rqnoj.cn/Problem_217.html#include<cstring>#include<cstdlib>#include<cstdio>const int MAXN = 1005;int s[MAXN], top, t[MAXN];int cnt, hight[MAXN], cur;int N;int main(){ while( scanf( "%d", &N) == 1) { cnt = 1, top = 1; for( int i = 1; i <= N; i ++) { sc... 阅读全文
posted @ 2012-07-20 17:59 找回失去的 阅读(241) 评论(0) 推荐(0) 编辑