01揹包

優化之前的代碼  優化之後的代碼   #include <iostream> #include <vector> #include <algorithm> using namespace std; const int maxv = 110; const int maxn = 10100; int w[maxn], dp[maxv]; //w爲每個硬幣的價值 //dp[i]爲 重量爲i時,可以
相關文章
相關標籤/搜索