随笔分类 - 背包问题
各种背包
摘要:题目链接 给你若干种面值的硬币,每种硬币有多个,给你一个数字m,问你能用给你的硬币组合出和为1-m之间的几种情况,例如1个两元硬币 2个一元硬币 m=3时 就能组合出来1 2 3 答案就是三 ;m=4时,答案就是4 ;m=5时答案还是4。(难得我解释了一次题意,hh) 如果会01背包与完全背包,多重
阅读全文
摘要:二维数组 hdu2602 #include <iostream> #include <cstring> using namespace std; const int maxn=4000; int dp[13000]; int d; int w; int n,wl; int main(){ memse
阅读全文

浙公网安备 33010602011771号