
LCA
三级头不怕通
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
倍增LCA和细节
void makelca(){ rep(j, 1, 23){ rep(i, 1, n+1){ fa[i][j] = fa[fa[i][j-1]][j-1]; ///循环顺序 细节1 } } } int lca(int x, int y){ if (depth[x] < depth[y]) swap(x, y);...原创 2018-08-16 23:52:12 · 191 阅读 · 0 评论 -
Codeforces 983E NN country 倍增 树状数组
http://codeforces.com/contest/983/problem/E E. NN country time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output In the NN country, ...原创 2019-02-14 06:10:05 · 362 阅读 · 0 评论