選課(依賴揹包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
相關文章
相關標籤/搜索