。。。

导航

随笔分类 -  模板--动态规划

【动态规划】【子序列模板】
摘要:ACM模板【最长上升子序列】输出长度while(scanf("%s%s",s1+1,s2+1)!=EOF) { l1 = strlen(s1+1); l2 = strlen(s2+1); for(i = 0; i f[i][j-1])... 阅读全文

posted @ 2017-07-31 18:45 大学僧 阅读(178) 评论(0) 推荐(0)

【动态规划】【背包模板】
摘要:ACM模板void CompletePack(int cost,int weight,int V){//完全背包 int i; for( i = cost; i = cost; i --) dp[i] = max(dp[i],dp[i-cost]+weigh... 阅读全文

posted @ 2017-07-26 09:28 大学僧 阅读(133) 评论(0) 推荐(0)