摘要:
01背包,输出方案#include#include#include#define maxn 100009using namespace std;int f[maxn];int num[30];int g[30][maxn];int cot[30];int main(){ int n,v; int sum; while(scanf("%d",&sum)!=EOF) { scanf("%d",&n); memset(f,0,sizeof f); memset(g,0,sizeof g); for(int i=1;i=0... 阅读全文