【无标题】
H. Crystalfly 代码
t<=3说明只能得到一个子树或者另一颗子树的根节点,然后分类成三种树
LL dp[3][N];
int a[N], t[N];
vector<int> v[N];
void dfs(int u, int fa)
{
int ma = 0;
PII c[3] = {{1e18, 0}, {1e18, 0}}; // 求dp[2][x] -
for(auto x : v[u])
{
if(x == fa) continue;
d
原创
2022-02-27 16:10:29 ·
370 阅读 ·
0 评论