背包
摘要:
01背包。输出方案。View Code #include<stdio.h>#include<string.h>#include<stdlib.h>#include<algorithm>#include<stack>using namespace std;int v[1000], num[1000], Vp[1000];const int inf = 0x7f7f7f7f;int dp[1100][1100];int st[1110], top;//输出方案种类 void DFS( int x, int volume, int sum, 阅读全文
posted @ 2012-08-10 13:47 more think, more gains 阅读(172) 评论(0) 推荐(0) 编辑