Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

树上依赖背包问题 #12

Open
ongiant opened this issue Feb 13, 2023 · 1 comment
Open

树上依赖背包问题 #12

ongiant opened this issue Feb 13, 2023 · 1 comment

Comments

@ongiant
Copy link

ongiant commented Feb 13, 2023

  1. 在给的树上背包pdf文件里第5算法里, $dp_r=I_{C_r,W_r} * (\mathbf 1 + dp_{s_1}) * (\mathbf 1 + dp_{s_2}) * \dots$,为何 $*$ 的时候要加 $\mathbf 1$,而不是直接 $* dp_{s_1}$
  2. 这个泛化物品的解法,状态定义是什么
  3. 大佬能把源代码传到github上来吗?我等hdu已经半个月了,还是宕机状态,实在等不下去了
@SamZhangQingChuan
Copy link
Owner

  1. 因为dp定义里面要求“一定要拿根对应的物品”,不加1就表示一定要拿儿子对应的物品
  2. 第5节第一段
  3. https://github.com/SamZhangQingChuan/Editorials/blob/master/%E6%95%99%E7%A8%8B/%E5%8A%A8%E6%80%81%E8%A7%84%E5%88%92/%E6%A0%91%E4%B8%8A%E8%83%8C%E5%8C%85/src/main.tex 源代码里面有

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants