摘要:
树链剖分 模版#include#define lson l,m,rt G[maxn];int dep[maxn],son[maxn],fa[maxn],siz[maxn];int top[maxn];int id[maxn];int num;int val[maxn];struct Tree{ ... 阅读全文
摘要:
SPOJ375 Query on a tree 树链剖分no tagsYou are given a tree (an acyclic undirected connected graph) withNnodes, and edges numbered 1, 2, 3...N-1.We will ... 阅读全文