摘要:
树形dp dp[i][0]表示i是服务器 dp[i][1]表示i不是服务器,i父亲是 dp[i][2]表示u与u的父亲都不是 转移方程很显然 #include<bits/stdc++.h> using namespace std; const int maxn = 1e4+10; int dp[ma 阅读全文
posted @ 2019-05-17 10:54
plysc
阅读(105)
评论(0)
推荐(0)
摘要:
一道很水的题 树形dp 题目连接 https://vjudge.net/problem/UVA-12186 #include<bits/stdc++.h> using namespace std; const int maxn = 1e5+10; vector<int> son[maxn]; int 阅读全文
posted @ 2019-05-17 09:49
plysc
阅读(129)
评论(0)
推荐(0)