![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
主席树
qdu_ellery
我有梦想啊!
展开
-
Kth number HDU - 2665 (主席树)(模板)
Give you a sequence and ask you the kth big number of a inteval. Input The first line is the number of the test cases. For each test case, the first line contain two integer n and m (n, m <= 100000...原创 2019-09-05 01:07:57 · 107 阅读 · 0 评论 -
Super Mario HDU - 4417(主席树)(求小于k的多少个)
Mario is world-famous plumber. His “burly” figure and amazing jumping ability reminded in our memory. Now the poor princess is in trouble again and Mario needs to save his lover. We regard the road to...原创 2019-09-05 03:11:46 · 109 阅读 · 0 评论 -
转主席树代码
1 #include<cstdio> 2 #include<algorithm> 3 using namespace std; 4 const int N=2e5+10; 5 const int M=N*10; 6 struct President_Tree{ 7 int L,R,sum; 8 }T[M<<1]; 9 int last[...原创 2019-09-23 19:32:40 · 119 阅读 · 0 评论 -
Destiny CodeForces - 840D(主席树)
Once, Leha found in the left pocket an array consisting of n integers, and in the right pocket q queries of the form l r k. If there are queries, then they must be answered. Answer for the query is mi...原创 2019-09-24 14:50:33 · 476 阅读 · 0 评论