数据结构 2
树上分块。第一种是随机撒点,在树上随机撒 $\frac{n}{S}$ 个点,关键点间期望距离不超过 $S$。优势很明显,当 $S$ 取根号的时候,可以处理出所有关键点间的信息,然后跳根号次就可以...
In mathematics you don't understand things, you just get used to them.
In mathematics you don't understand things, you just get used to them.