
主席树
七九河开
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Distance on the tree(19南昌网络赛)
题目https://nanti.jisuanke.com/t/38229思路1 主席树+LCA#include <bits/stdc++.h>using namespace std;const int maxn = 200005;struct edge{ int v,w; edge(int _v,int _w) { v...原创 2019-04-22 21:42:01 · 155 阅读 · 0 评论 -
K-th Number POJ - 2104 (主席树 学习详解)
https://cn.vjudge.net/problem/POJ-2104题意给你N个数 吗、M次查询,每次查询给你 IJK 问第I个数到第J个数中第K大思路字典树,每添加一个数都建立一棵线段树,J和I 做减法就可以的到这个区间的线段树#include <cstdio>#include <cstring>#include <iostream...原创 2018-12-05 15:10:07 · 262 阅读 · 0 评论