树形DP
wind_bow
.。
展开
-
HDU5959 Tree Cutting 树形DP+FWT优化异或卷积
参考博客 https://www.cnblogs.com/Mychael/p/9255572.html https://www.cnblogs.com/cjyyb/p/9065611.html 题意:给定一棵无根树,统计所有子树的异或和的个数。 dp[u][i],表示u为根的数,xor值得到i的方案数 显然,每次合并就是两个dp dp值做xor xor卷积 利用FWT优化异或...原创 2019-05-03 17:06:13 · 301 阅读 · 0 评论 -
CF1156D 0-1-Tree 换根DP
参考https://www.luogu.org/problemnew/solution/CF1156D D. 0-1-Tree time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given a...转载 2019-05-08 15:32:32 · 488 阅读 · 0 评论 -
Codeforces Round #554 (Div. 2) D Neko and Aki's Prank(记忆化DFS)
D. Neko and Aki's Prank time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Neko is playing with his toys on the backyard of Aki's hou...转载 2019-05-07 21:03:41 · 145 阅读 · 0 评论