2011年11月10日
摘要: 算是完全背包入门题吧。#include<iostream> #define max(a,b) (a>b?a:b) using namespace std; const int inf=2001000; const int year=45; int w,n,y; struct { int interest; int w; }bond[15]; int mat[inf]; int dp(int w) { w/=1000; for(int i=1;i<=n;i++) for(int j=bond[i].w;j<=w;j++) { mat[j]=max(mat[j],ma 阅读全文
posted @ 2011-11-10 13:30 不是我干的 阅读(142) 评论(0) 推荐(0)