摘要:
###题目链接:https://www.luogu.com.cn/problem/P1600 参考题解:https://www.cnblogs.com/lfyzoi/p/10221884.html 转换思路,枚举每个观察员,统计有哪些运动员会给观察员做贡献。因为给观察员做贡献的运动员都在观察员的子树 阅读全文
摘要:
###题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5293 \(sum[u]\) 表示子树 \(dp\) 值的和,\(dp[u]\) 表示子树 \(u\) 的答案,这里我用 \(dp[u][0]\) 表示 \(sum\), \(dp[u][1]\) 阅读全文