摘要: 该题为二维背包即比一维多加了一个限制条件,同理可以推至多维即是有多个限制条件#include <stdio.h>#include <string.h>struct node{ int r,e;}s[150];int max(int a,int b){ if (a>b) return a; else return b;}int main(){ int n,m,k,a,i,l,j,f[100][100]; while(scanf("%d%d%d%d",&n,&m,&k,&a)!=EOF) { for (i=1;i&l 阅读全文
posted @ 2013-05-06 19:24 一线添 阅读(132) 评论(0) 推荐(0) 编辑