选课(依赖背包dp)

其实就是把背包dp搬树上了,spa 注意每个节点必需要先选本身才能选孩子节点code #include<cstdio> #include<cstdlib> #include<cmath> #include<algorithm> #include<cstring> using namespace std; const int inf=0x3f3f3f3f; int n,m,val[305],f[30
相关文章
相关标签/搜索