POJ - 1330 Nearest Common Ancestors(倍增LCA)

裸的求LCA,用的倍增,就是为了记个模板,似懂非懂,之后有时间就弄懂这些算法(大几率不会了。。。。。。)算法 #include <queue> #include <stdio.h> #include <string.h> using namespace std; const int MAXN = 10010; const int DEG = 20; struct Edge { int
相关文章
相关标签/搜索