
莫队算法/树上莫队/树上分块
等我学会后缀自动机
侠影之谜
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 · 145 阅读 · 0 评论 -
P2709 小B的询问 莫队算法
#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-03 17:14:57 · 108 阅读 · 0 评论 -
HDU 6333 Problem B. Harvest of Apples (莫队算法+数学思维)
Problem B. Harvest of Apples Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 2073 Accepted Submission(s): 804 Problem Description The...原创 2018-08-02 22:54:37 · 264 阅读 · 3 评论 -
HDU 4858 项目管理 (莫队思想分块优化+暴力)
项目管理 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3664 Accepted Submission(s): 1367 Problem Description 我们建造了一个大项目!这个项目有n个节点,用很多边连接起...原创 2018-08-30 23:38:03 · 218 阅读 · 0 评论 -
HDU 5213 Lucky (莫队算法+容斥定理)*
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5213 #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-18 08:11:59 · 269 阅读 · 0 评论 -
HDU 4467 Graph (莫队思想+图的分块)*
题目链接:acm.hdu.edu.cn/showproblem.php?pid=4467 #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) sca...原创 2018-09-14 13:42:27 · 445 阅读 · 1 评论 -
HDU 5145 NPY and girls (莫队算法+组合逆元)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5145 #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-20 14:23:18 · 159 阅读 · 0 评论