随笔分类 - 其它 -- 虚树
摘要:A. 组队比赛 签到。 Code cpp / Author: heyuhhh Created Time: 2020/4/18 12:10:50 / include include include include include include include include include incl
阅读全文
摘要:P2495 [SDOI2011]消耗战 "题目链接" 题解: 虚树$dp$入门题吧。虚树的核心思想其实就是每次只保留关键点,因为关键点的dfs序的相对大小顺序和原来的树中结点dfs序的相对大小顺序都是一样的,所以可以就求出dfs序并且利用它来构造。最后的图中只有关键点以及某些关键点对的lca。 具体
阅读全文