2017年6月20日

dp之多重背包(未用二进制优化)

摘要: hdu 2191: #include <iostream>#include <stdio.h>#include <string.h>using namespace std;int main(){ int T; scanf("%d",&T); int num[1005]; int weight[100 阅读全文

posted @ 2017-06-20 15:50 chinacwj1 阅读(202) 评论(0) 推荐(0) 编辑

dp之完全背包 hdu--2159一维数组做法

摘要: #include <iostream>#include <stdio.h>#include <string.h>using namespace std;int main(){ int n,m,t,s; int dp[205]; int w[205]; int v[205]; int cnt[205] 阅读全文

posted @ 2017-06-20 13:44 chinacwj1 阅读(151) 评论(0) 推荐(0) 编辑

导航