摘要: 树链剖分 模版#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{ ... 阅读全文
posted @ 2015-09-01 23:25 __560 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 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 ... 阅读全文
posted @ 2015-09-01 23:19 __560 阅读(227) 评论(0) 推荐(0) 编辑