摘要: 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 阅读全文
posted @ 2019-08-03 14:43 Artoriax 阅读(221) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-08-03 10:58 Artoriax 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 简介 树链剖分就是将树划分为多条链,将每条链映射到序列上,然后使用线段树,平衡树等数据结构来维护每条链的信息。 树剖将树链映射到序列上后用线段树等数据结构来维护树链信息,所以可以像区间修改,区间查询一样进行树上路径的修改、查询等操作 基本概念 重儿子:子树结点数目最多的儿子(size最大的点); 重 阅读全文
posted @ 2019-08-03 10:30 Artoriax 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2019-08-03 10:05 Artoriax 阅读(260) 评论(0) 推荐(0) 编辑