Tyvj 1051 选课 树形dp
#include#include#include#includeusing namespace std;const int N =310;int val[N];vectorg[N];int dp[N][N];void dfs(int rt,int m){ if(m==0) { return; } for(int h=0;h<g[rt].size();h++){ i