![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
权值线段树
Nightmare丶
登高必自卑,行远必自迩
展开
-
HDU 1394 Minimum Inversion Number
Problem Description The inversion number of a given number sequence a1, a2, …, an is the number of pairs (ai, aj) that satisfy i < j and ai > aj. For a given sequence of numbers a1, a2, …, an, i...原创 2019-12-04 00:14:45 · 78 阅读 · 0 评论 -
P3369 【模板】普通平衡树
题目描述 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作: 插入 xxx 数 删除 xxx 数(若有多个相同的数,因只删除一个) 查询 xxx 数的排名(排名定义为比当前数小的数的个数 +1+1+1 ) 查询排名为 xxx 的数 求 xxx 的前驱(前驱定义为小于 xxx,且最大的数) 求 xxx 的后继(后继定义为大于 xxx,且最小的数) 输入格式 第一行为 n...原创 2019-12-03 23:22:45 · 110 阅读 · 0 评论