![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构 -------- 主席树
SolarDomo
每天都被头像萌醒
展开
-
HDU 2665 Kth number 主席树模板题
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2665主席树模板题代码 :#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#define sf scanf#define pf printf#define totNode maxn * 60原创 2016-10-12 19:56:28 · 353 阅读 · 0 评论 -
SPOJ Count on a tree 在线LCA + 主席树
题意:求树上a , b路径上第k大的点 主席树a + 主席树b - 主席树(LCA(a,b)) - 主席树(FA(LCA(a,b)))代码:#include <bits/stdc++.h>#define sf scanf#define pf printfusing namespace std;const int maxn = 100000 + 50;/** 主席树 */const in原创 2016-10-13 22:12:50 · 338 阅读 · 0 评论