
LCA
文章平均质量分 83
ferric_ion
OI狗。音游狗。
展开
-
【Tarjan边双缩点】【CEOI2000】Roads
题目描述 The Romanian Ministry of Transport decides to upgrade the Romanian roads. Each road is bidirectional and directly connects two towns. No two towns are directly connected by more than one road.原创 2017-01-02 16:04:46 · 1656 阅读 · 0 评论 -
【XJB研究】关于几种LCA求法的时间
近日写NOIP2015的运输计划,第一眼看就是树剖。O(nlog3n),肯定过不去啊。听说可以差分,那就差分吧。 于是需要一个差分数组,需要预处理LCA。 这两天写的LCA好像还挺多的,那就上倍增吧。 最后一个毒点,n=300000,m=300000,卡的不要不要的。原创 2016-04-24 23:57:57 · 989 阅读 · 3 评论