摘要:
状态转移方程:dp[u][0] = max(dp[v][0],dp[v][1]);dp[u][1] += dp[v][0];#include #include #include #include #include using namespace std;const int maxn = 6010;vectortree[maxn];int rat[maxn],deg[maxn],dp[maxn][2];int max(int x,int y){ return x > y ? x : y;}void dfs(int u){ if(0 == tree[u].size()) { ... 阅读全文
posted @ 2013-07-29 08:55
一生挚爱
阅读(144)
评论(0)
推荐(0)

浙公网安备 33010602011771号