![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
离线处理
等我学会后缀自动机
侠影之谜
展开
-
Codeforces 369E Valera and Queries(树状数组+离线查询) *
Valera loves segments. He has recently come up with one interesting problem.The Ox axis of coordinates has n segments, the i-th segment starts in position li and ends in position ri (we will mark it...原创 2018-08-18 05:44:01 · 201 阅读 · 0 评论 -
HDU 4666 Hyperspace (曼哈顿距离+线段树维护极值)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4666#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define ll lon...原创 2018-10-26 16:17:32 · 264 阅读 · 0 评论 -
Codeforces 522D Closest Equals (线段树+DP+离线)*
题目链接:http://codeforces.com/problemset/problem/522/D#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...原创 2018-09-30 10:00:16 · 180 阅读 · 0 评论 -
HDU 4777 Rabbit Kingdom (树状数组+离线+思维)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4777#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x...原创 2018-10-06 15:21:04 · 129 阅读 · 0 评论 -
NewCoder 多校1 J Different Integers (树状数组+贡献思维)
题目链接:https://www.nowcoder.com/acm/contest/139/J#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x,y) ...原创 2018-10-01 15:58:49 · 138 阅读 · 0 评论 -
HDU 4638 Group (树状数组+离线处理+思维)*
题目大意:http://acm.hdu.edu.cn/showproblem.php?pid=4638#include<bits/stdc++.h>using namespace std;#define debug puts("YES");#define rep(x,y,z) for(int (x)=(y);(x)<(z);(x)++)#define read(x,...原创 2018-09-15 08:03:59 · 112 阅读 · 0 评论 -
Codeforces round 19D Points(离线处理+Set集合的运用+离散化数据)好题
Pete and Bob invented a new interesting game. Bob takes a sheet of paper and locates a Cartesian coordinate system on it as follows: point (0, 0) is located in the bottom-left corner, Ox axis is direc...原创 2018-08-21 08:42:17 · 153 阅读 · 0 评论 -
HDU 3938 Portal(并查集构建MST+离线处理)*
PortalTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2063 Accepted Submission(s): 1008 Problem DescriptionZLGG found a magic theory ...原创 2018-08-30 21:41:47 · 129 阅读 · 0 评论 -
HDU 6406 Taotao Picks Apples (单调栈维护+离线查询+简单DP思想)*
Taotao Picks ApplesTime Limit: 2000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1823 Accepted Submission(s): 562 Problem DescriptionThere is an ...原创 2018-08-17 18:57:39 · 219 阅读 · 0 评论 -
HDU 4666 Hyperspace (线段树+曼哈顿距离+离线查询)
HyperspaceTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1450 Accepted Submission(s): 708 Problem DescriptionThe great Mr.Smith ha...原创 2018-08-20 08:12:23 · 195 阅读 · 0 评论 -
Codeforces Global Round 1 F. Nearest Leaf(线段树+离线操作)*
题目链接:http://codeforces.com/contest/1110/problem/F题目大意:统计查询类题目,给定一颗树,树边有权重,查询格式是:x,y,z,查询x节点到[y,z]区间中的叶节点的最短路径长度是多少。其树的产生形式严格遵循DFS序形式。题目分析: 这道题我是瞄了眼题解的思路的,才知道有个换根的性质。大体是这样的:首先考虑所有的x都是1根节...原创 2019-02-21 23:51:51 · 157 阅读 · 0 评论