摘要:
70 371 10069 11 2#include #include using namespace std;int dp[105][1005], w[105],v[105],T,M;int max(int x,int y){ return x>y?x:y; }void f( ){ ... 阅读全文
摘要:
#include #include using namespace std;int dp[105][1005], w[105],v[105],T,M,;int max(int x,int y) { return x>y?x:y; }int f(int x,int y){ int t; if (d... 阅读全文
摘要:
#include #include using namespace std;int dp[105][1005], w[105],v[105],T,M,;int max(int x,int y) { return x>y?x:y; }int f(int x,int y){ int t; if (... 阅读全文
摘要:
rqnoj 15 采药 原创 2015年12月14日 09:03:20 标签: c语言 411 原创 2015年12月14日 09:03:20 标签: c语言 411 题目描述 辰辰是个天资聪颖的孩子,他的梦想是成为世界上最伟大的医师。为此,他想拜附近最有威望的医师为师。医师为了判断他的资质,给他出 阅读全文
摘要:
#include using namespace std;int dp[105][1005],w[105],v[105] ;int max(int a,int b) { return a > b ? a : b; }int f(int x,int y){ int t ; if(dp[x][... 阅读全文
摘要:
#include using namespace std;int dp[105][1005],w[105],v[105] ;int max(int a,int b) { return a > b ? a : b; }int f(int x,int y){ int t ; if(dp[x][... 阅读全文
摘要:
物品质量 w[0] w[1] w[2] ....... w[n] 背包容量c T物品价值 v[0] v[1] v[2] ....... v[n] 物品种类 n N(一)设DP(x,y) 表示 从前x项物品中 取出装入 体积为y的背包 的 物品的... 阅读全文
摘要:
阅读全文
摘要:
#include int f(int a,int b){ if(aint f(int a,int b){ if(b==0) return 1 ; if(a#define MAX 200void main( ){ int... 阅读全文
摘要:
ZOJ 1027/*zoj 1027 poj 1080 思路: 三种状态,取最大值:s1[i]和s2[j]配 :dp[i-1][j-1]+cost[my[s1[i]]][my[s2[j]]];s1[i]和'-' 配: dp[i-1][j]+cost[my[s1[i]]][my['-']];s2[... 阅读全文