0-1揹包(滾動數組)

  0-1揹包使用滾動數組 #include <iostream> #include <vector> #include <cstring> using namespace std; const int MIN = 0x80000000; const int N = 3;//物品數量 const int V = 5;//揹包容量 int f[V+1]; int Package(int *W, in
相關文章
相關標籤/搜索