摘要:
"题目链接" 依旧是树形dp啦,一样的找根节点然后自下而上更新即可 设$dp_{i,0}$表示第i个不设,$dp_{i,1}$表示第i个设一个,容易得到其状态转移 $dp_{i,0} = \sum{dp_{j,1}}(j为i的儿子节点)$ $dp_{i,1} = 1 + \sum{min(dp_{j 阅读全文
摘要:
"题目链接" 经典的树形dp,最大独立集,对于每个点就有2个状态,选/不选 设$dp_{i,0}$表示不选第i个,$dp_{i,1}$表示选第i个,容易得到其状态转移 $dp_{i,0} = \sum{max(dp_{j,0}, dp_{j,1})}(j为i的儿子节点)$ $dp_{i,1} = r 阅读全文
摘要:
There are two processes to switch, when one run:io instruction, switch on other process. After ios, the first process's state is ready, which must swi 阅读全文