LCA
hadis_fukan
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
poj 1330 Nearest Common Ancestors (LCA)
题意:求两个点的最近公共祖先。 1A#include #include #include #include #define maxn 100010 using namespace std; int fa[maxn],lev[maxn],pre[maxn],c1,c2; vector son[maxn]; bool dfs(int rt,int obj) { for(int i原创 2014-08-10 15:22:30 · 628 阅读 · 0 评论 -
hdu 4912 Paths on the tree (LCA+贪心)
题意: 有一颗无根树,原创 2014-08-11 16:17:50 · 652 阅读 · 0 评论
分享