
树链剖分
LauZiyang
exploring
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
省选专练HAOI2015树上操作
题如其名树链剖分板子题#include<bits/stdc++.h> using namespace std; #define lc (p<<1) #define rc (p<<1|1) typedef int INT; #define int long long const int N=2e5+100; inline void read(int &x)...原创 2018-07-08 17:12:45 · 220 阅读 · 0 评论 -
省选专练之数据结构[JLOI2014]松鼠的新家
简单的树链剖分主要是为了复习利用线段树维护区间加1就好了// ConsoleApplication5.cpp: 定义控制台应用程序的入口点。 // //#include "stdafx.h" #include<iostream> #include<cstdio> #include<algorithm> #include<cmath> #includ...原创 2018-07-15 15:38:56 · 151 阅读 · 0 评论 -
省选专练[SDOI2014]旅行
被主席树的标签坑的死去活来2333 总是觉得一颗主席树少了一个标记 你需要维护区间+宗教+权值 所以你需要很多棵线段树 动态开点就好了 #include<iostream> #include<cstdio> #include<cstring> #include<cmath> #include<algorithm> usin...原创 2018-07-26 15:41:54 · 210 阅读 · 0 评论 -
CF487E Tourists
Cyberland 有 n 座城市,编号从 1 到 n,有 m 条双向道路连接这些城市。第 j 条路连接城市 aj 和 bj。每天,都有成千上万的游客来到 Cyberland 游玩。 在每一个城市,都有纪念品售卖,第 i 个城市售价为 wi。这个售价有时会变动。 每一个游客的游览路径都有固定起始城市和终止城市,且不会经过重复的城市。 他们会在路径上的城市中,售价最低的那个城市购买纪念品。 ...原创 2018-09-26 22:04:20 · 938 阅读 · 0 评论