
主席树
文章平均质量分 87
Cherry_0525
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【主席树】HYSBZ - 2006 超级钢琴
HYSBZ - 2006 超级钢琴 小Z是一个小有名气的钢琴家,最近C博士送给了小Z一架超级钢琴,小Z希望能够用这架钢琴创作出世界上最美妙的 音乐。 这架超级钢琴可以弹奏出n个音符,编号为1至n。第i个音符的美妙度为Ai,其中Ai可正可负。 一个“超级 和弦”由若干个编号连续的音符组成,包含的音符个数不少于L且不多于R。我们定义超级和弦的美妙度为其包含的 所有音符的美妙度之和。两个超级...原创 2018-11-28 21:35:15 · 132 阅读 · 0 评论 -
【主席树模板题||划分树模板题】B - K-th Number POJ - 2104
B - K-th Number POJ - 2104 You are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that ...原创 2018-11-26 21:01:28 · 265 阅读 · 0 评论 -
【树状数组套主席树 动态主席树】ZOJ - 2112 Dynamic Rankings
Dynamic Rankings ZOJ - 2112 The Company Dynamic Rankings has developed a new kind of computer that is no longer satisfied with the query like to simply find the k-th smallest number of the given N n...原创 2018-11-30 19:27:51 · 212 阅读 · 0 评论 -
【主席树 逆序建树】HDU - 5919 Sequence II
G - Sequence II HDU - 5919 Mr. Frog has an integer sequence of length n, which can be denoted as a1,a2,⋯,ana1,a2,⋯,anThere are m queries. In the i-th query, you are given two integers lili and rir...原创 2018-12-01 10:37:31 · 179 阅读 · 0 评论 -
【主席树+LCA 树上路径第K大值模板题】HYSBZ - 2588 || Spoj 10628. Count on a tree
K - Spoj 10628. Count on a tree HYSBZ - 2588 给定一棵N个节点的树,每个点有一个权值,对于M个询问(u,v,k),你需要回答u xor lastans和v这两个节点间第K小的点权。其中lastans是上一个询问的答案,初始为0,即第一个询问的u是明文。 Input 第一行两个整数N,M。 第二行有N个整数,其中第i个整数表示点i的权值。 后...原创 2018-12-05 20:32:46 · 407 阅读 · 0 评论 -
【可持久化线段树】I - To the moon HDU - 4348
I - To the moon HDU - 4348 Background To The Moon is a independent game released in November 2011, it is a role-playing adventure game powered by RPG Maker. The premise of To The Moon is based aro...原创 2018-12-03 17:21:19 · 246 阅读 · 0 评论 -
【主席树+二分答案】 HDU-6621 杭电2019多校4 K-th Closest Distance
http://acm.hdu.edu.cn/showproblem.php?pid=6621 Problem Description You have an array: a1, a2, , an and you must answer for some queries. For each query, you are given an interval [L, R] and two num...原创 2019-08-01 16:15:23 · 214 阅读 · 0 评论