![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据离散化
等我学会后缀自动机
侠影之谜
展开
-
HDU 4866 Shooting (主席树+离散化优化+初始化问题)
#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 long long#define lrt int l,int r,int rt#define lson l,m...原创 2020-04-04 21:17:18 · 143 阅读 · 0 评论 -
HDU 6534 Chika and Friendly Pairs (莫队+树状数组+离散化+预处理)
#include<bits/stdc++.h>using namespace std;#define rep(x,y,z) for(int (x)=(y);(x)<(z);x++)#define mst(x,y) memset(x,y,sizeof(x))#define ll long long#define pii pair<int,int> #def...原创 2020-02-04 10:06:42 · 115 阅读 · 0 评论 -
CodeForces 255C Almost Arithmetical Progression (DP+离散化)
发现规律序列为a,b,a,b,a,b即可.#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 long long#define lrt int l,in...原创 2019-05-09 22:39:41 · 127 阅读 · 0 评论 -
HDU 4991 Ordered Subsequence (树状数组+离散化)水
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=4991#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-09 09:37:18 · 161 阅读 · 0 评论 -
Codeforces 474E Pillars (线段树+DP+二分+离散)
题目链接:http://codeforces.com/problemset/problem/474/E#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-29 23:46:42 · 156 阅读 · 0 评论 -
HDU 4456 Crowd (二维树状数组+哈希离散化+坐标转化)*
题目大意:http://acm.hdu.edu.cn/showproblem.php?pid=4456#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-28 21:07:56 · 276 阅读 · 0 评论 -
CodeForces - 629D Babaei and Birthday Cake (线段树+DP裸题目)
题目链接:http://codeforces.com/problemset/problem/629/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-28 20:34:26 · 214 阅读 · 0 评论 -
HDU 6406 Taotao Picks Apples (单调栈+树状数组统计+离散化)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6406#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-12 19:12:30 · 102 阅读 · 0 评论 -
CodeForces - 689E Mike and Geometry Problem(离散化+组合数+标记法求区间和+map)*
题目链接:http://codeforces.com/problemset/problem/689/E#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-27 00:00:02 · 146 阅读 · 0 评论 -
HDU 5372 Segment Game (树状数组+离散化)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5372#include<bits/stdc++.h>#pragma comment(linker,"/STACK:1024000000,1024000000")using namespace std;#define debug puts("YES");#define rep(...原创 2018-09-07 09:38:29 · 143 阅读 · 0 评论 -
HDU 4675 GCD of Sequence (莫比乌斯反演第二种形式+组合数学)*
GCD of SequenceTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65535/65535 K (Java/Others)Total Submission(s): 1979 Accepted Submission(s): 701 Problem DescriptionAlice is playing a...原创 2018-08-24 14:37:42 · 269 阅读 · 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 · 159 阅读 · 0 评论 -
HDU 6053 TrickGCD (莫比乌斯反演+数学分段处理)*
TrickGCDTime Limit: 5000/2500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 4147 Accepted Submission(s): 1509 Problem DescriptionYou are given an array...原创 2018-08-23 16:33:37 · 176 阅读 · 0 评论 -
HDU 5489 Removed Interval (离散化数据建树+线段树+滑动窗口)*
Removed IntervalTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2223 Accepted Submission(s): 700 Problem DescriptionGiven a sequence ...原创 2018-08-16 06:48:44 · 185 阅读 · 0 评论