随笔分类 -  主席树

摘要: 前言 主席树,又叫函数式线段树,可持久化线段树,是一种非常有用的数据结构,我们通过一些例题来深入理解主席树的应用。 阅读全文
posted @ 2017-01-03 10:44 ZegWe 阅读(486) 评论(0) 推荐(0)
摘要:给定一个长度为 N 颜色序列A,有M个询问:每次询问一个区间里是否有一种颜色的数量超过了区间的一半,并指出是哪种颜色。 阅读全文
posted @ 2016-10-17 09:58 ZegWe 阅读(633) 评论(0) 推荐(0)
摘要: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 would be able to return quickly k-th order statistics in the array segment. 阅读全文
posted @ 2016-10-16 20:39 ZegWe 阅读(268) 评论(0) 推荐(0)