摘要: 主席树静态序列查区间第k大 struct tree{ int L,R,sum; }t[100010]; void change(int &now,int pre,int l,int r,int k){ now=++cnt; t[now]=t[pre]; t[now].sum++; int mid=( 阅读全文
posted @ 2019-11-03 17:33 passione 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 俞鼎力大牛:堆得可持久化 直接上代码? #include<bits/stdc++.h> #define eps 1e-8 using namespace std; int head[10005],cnt=-1,v[10005],rt[10005],mark[1000005],ans,fa[10005 阅读全文
posted @ 2019-11-03 17:19 passione 阅读(342) 评论(0) 推荐(0) 编辑