摘要:
HDU 4348 To the moon Description You‘ve been given N integers A [1], A [2],..., A [N]. On these integers, you need to implement the following operatio 阅读全文
摘要:
SPOJ QTREE3 Query on a tree again! Description You are given a tree (an acyclic undirected connected graph) with N nodes. The tree nodes are numbered 阅读全文
摘要:
简介 树链剖分就是将树划分为多条链,将每条链映射到序列上,然后使用线段树,平衡树等数据结构来维护每条链的信息。 树剖将树链映射到序列上后用线段树等数据结构来维护树链信息,所以可以像区间修改,区间查询一样进行树上路径的修改、查询等操作 基本概念 重儿子:子树结点数目最多的儿子(size最大的点); 重 阅读全文
摘要:
Codeforces 438D The Child and Sequence Description At the children's day, the child came to Picks's house, and messed his house up. Picks was angry at 阅读全文