lca板子 帶常數優化

#include<bits/stdc++.h> using namespace std; const int N = 2000; int h[N],nex[N<<1],to[N<<1],tot; void add(int x,int y){ to[++tot]=y;nex[tot]=h[x];h[x]=tot; } int fa[N][30],dep[N],lg[N]; void dfs(int
相關文章
相關標籤/搜索