![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LCA
文章平均质量分 75
bin_gege
这个作者很懒,什么都没留下…
展开
-
hdu_4547_CD操作(在线LCA)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=4547题意:中文,不解释题解:很裸的LCA,注意父目录打开子目录一次就够了,这里我才用倍增在线LCA+map过#include#include#include#include#define F(i,a,b) for(int i=a;i<=b;i++)#pragma comment(原创 2016-06-28 15:52:08 · 487 阅读 · 0 评论 -
hdu_5293_Tree chain problem(DFS序+树形DP+LCA)
题目连接:http://acm.hdu.edu.cn/showproblem.php?pid=5293被这题打蹦了,看着题解写的,很是爆炸,确实想不到,我用的DFS序+LCA+树形DP,当然也可以写树剖,不过这里DFS序更简单,因为都是对点到根的操作#include#include#include#pragma comment(linker, "/STACK:102400000,10原创 2016-06-28 21:22:04 · 385 阅读 · 0 评论