摘要: 多重背包问题,在网上看了背包九讲的前三篇,但感觉还是理解的不够透彻,过一段时间集中搞一下dp,现在就当预习啦#include <iostream> #include <cmath> using namespace std; int f[20001*6],m[7]; int main() { int t=0; while(cin>>m[1]>>m[2]>>m[3]>>m[4]>>m[5]>>m[6]) { t++; int i,sum=0; for(i=1;i<=6;i++) { sum+=m[ 阅读全文
posted @ 2012-11-16 18:55 lishimin_come 阅读(147) 评论(0) 推荐(0) 编辑