![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
LCA
VL——MOESR
ga
展开
-
【2022年11月24日提高A组】小王子【树上差分】
树上差分原创 2022-11-24 16:15:25 · 97 阅读 · 0 评论 -
【2022年11月16日提高A组】 树根选取【LCA】【树上差分】【DP】
DP + LCA + 树上差分原创 2022-11-16 18:23:12 · 58 阅读 · 0 评论 -
【集训DAY N】火车【LCA】【模拟】
LCA原创 2022-08-16 18:58:03 · 130 阅读 · 0 评论 -
【YBTOJ进阶训练指导】祖孙询问【倍增】【LCA】
倍增+lca原创 2022-03-07 20:02:30 · 154 阅读 · 0 评论 -
2021.08.10【NOIP提高B组】模拟 祖孙询问
思路:LCA板题codecodecode#include<iostream>#include<cstdio>#include<algorithm>using namespace std;int n, tot, m;int f[100100][25], head[100100], dep[100100];struct node{ int to, next;}b[1000100];void add(int x, int y){ b[+..原创 2021-08-10 19:30:05 · 55 阅读 · 0 评论 -
2021.07.14【NOIP提高B组】模拟 树的直径
思路:原创 2021-07-14 21:51:48 · 38 阅读 · 0 评论 -
【YBTOJ】树上距离
思路:LAC板子题codecodecode#include<iostream>#include<cstdio>using namespace std;int n, m, tot, head[100010];struct node{ int to, next, w;}b[1001000];int deep[100100], dis[100100];int f[100100][25];void add(int x, int y, int w){ ..原创 2021-06-13 16:03:43 · 101 阅读 · 0 评论 -
【Luogu_P3379】【模板】最近公共祖先(LCA)
链接模板#include<iostream>#include<cstdio>#include<cmath>#include<algorithm>#include<queue>#include<stack>#include<map>#include<cstring>using namespace std;int n, m, s;int d[500010], dep[500010], f原创 2020-08-22 11:10:51 · 87 阅读 · 0 评论