
LCA
风灵无畏YY
本蒟蒻为在校大学生,不定期更新一些有关计算机相关知识的学习记录,有不恰当的地方还请指出。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
SPOJ QTREE2 - Query on a tree II 倍增 LCA
SPOJ QTREE2 - Query on a tree IIDescriptionYou are given a tree (an undirected acyclic connected graph) with N nodes, and edges numbered 1, 2, 3…N-1. Each edge has an integer value assigned to ...原创 2018-07-30 11:49:27 · 198 阅读 · 0 评论 -
最近公共祖先——LCA 总结及其运用
tarjan模板#include<cstdio>#include<iostream>#include<cstring>#include<algorithm>#define maxn 1000010using namespace std;int n,m,s,cnt,tot;struct arr原创 2018-09-15 21:31:33 · 310 阅读 · 0 评论