主席树
Cosmic_Tree
什么时候才能像杨大佬一样强啊(´;︵;`)
展开
-
Boring Counting(主席树+二分)
题目描述In this problem you are given a number sequence P consisting of N integer and Pi is the ith element in the sequence. Now you task is to answer a list of queries, for each query, please tell us among [L, R], how many Pi is not less than A and not great原创 2020-09-08 12:28:44 · 238 阅读 · 0 评论 -
【模板】可持久化线段树 2(主席树)
题目链接https://www.luogu.com.cn/problem/P3834代码#include<iostream>#include<string>#include<map>#include<set>//#include<unordered_map>#include<queue>#include<cstdio>#include<vector>#include<cstring>原创 2020-09-05 20:32:08 · 243 阅读 · 0 评论 -
【模板】可持久化线段树 1(可持久化数组)
题目链接https://www.luogu.com.cn/problem/P3919代码#include<iostream>#include<string>#include<map>//#include<unordered_map>#include<queue>#include<cstdio>#include<vector>#include<cstring>#include<algori原创 2020-09-05 20:30:17 · 270 阅读 · 0 评论