树上dfs+分组背包
摘要:有依赖的背包问题 Code: #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 110; int n,V; int f[N][N];//f[i][j]表示以i为
阅读全文
货币系统(完全背包)
摘要:货币系统 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 110,M=25010; int n,m; int a[N];//货币 bool f[M];//dp
阅读全文
混合背包问题+二进制优化
摘要:混合背包问题 #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 1010; int f[N]; int n,m; int main(){ cin>>n>>m;
阅读全文
三进制状压dp
摘要:#define _CRT_SECURE_NO_WARNINGS #include<bits/stdc++.h> #define ull unsigned long long using namespace std; const int INF = 0x3f3f3f3f,M=27*27*27-1; i
阅读全文