摘要: 1.1 基本数据结构 1. 数组# 2. 链表,双向链表% 3. 队列,单调队列,双端队列# 4. 栈,单调栈# 1.2 中级数据结构 1. 堆# 2. 并查集与带权并查集# 3. hash 表# 自然溢出% 双hash% 1.3 高级数据结构 1. 树状数组# 2. 线段树#,线段树合并% 3. 阅读全文
posted @ 2017-11-14 19:26 秦こころ酱 阅读(197) 评论(0) 推荐(0) 编辑
摘要: sam 线性规划 可持久化平衡树 2-sat 莫比乌斯反演 FWT 退火调参 线性基 回文自动机 长链剖分 杜教筛 矩阵树定理 奇奇怪怪的数学结论 阅读全文
posted @ 2018-12-05 11:27 秦こころ酱 阅读(249) 评论(0) 推荐(0) 编辑
摘要: 题目和题解看这里 #include<bits/stdc++.h> #define ll long long using namespace std; inline int read() { int x=0,f=1;char c=getchar(); for(;!isdigit(c);c=getcha 阅读全文
posted @ 2018-10-15 19:26 秦こころ酱 阅读(110) 评论(0) 推荐(0) 编辑
摘要: Insert就是垃圾!!!!!!以后只要不是强制在线就算死也不用这个辣鸡玩意儿!!!! #include<bits/stdc++.h> #define ll long long using namespace std; int n,k,cnt; namespace KD_Tree { int dim 阅读全文
posted @ 2018-09-26 18:20 秦こころ酱 阅读(133) 评论(0) 推荐(0) 编辑
摘要: 题解和题目看这里 #include<bits/stdc++.h> using namespace std; int T; int n,m; int fa[100010]; int d[100010]; int cnt; int cnt2; int fnd(int x) {return fa[x]== 阅读全文
posted @ 2018-08-09 15:40 秦こころ酱 阅读(99) 评论(0) 推荐(0) 编辑
摘要: 题解和题看这里 #include<bits/stdc++.h> using namespace std; #define Q 137 #define mod 19260817 #define Mod 20172101 #define ll long long ll hsh1[100010]; ll 阅读全文
posted @ 2018-08-09 08:14 秦こころ酱 阅读(86) 评论(0) 推荐(0) 编辑
摘要: 这里只有本菜鸡的代码 题解看这里 #include<bits/stdc++.h> using namespace std; int st[21][100010]; int st2[21][100010]; int n,q,A[100010]; int cnt,fst[100010],nxt[2000 阅读全文
posted @ 2018-08-07 14:26 秦こころ酱 阅读(107) 评论(0) 推荐(0) 编辑
摘要: Day 1: 作为这次承办校SSF的学生,照常来学校然后在早读时直接翘课(其实请了假)去裕龙,结果去了发现来早了入住不了(话说为什么不住反而要多加钱,真·China Cheatingmoney Federation,不过裕龙的条件挺不错,心疼隔壁赛场)结果打了一会王者,打了一会东方,顺便做了两道题. 阅读全文
posted @ 2018-05-17 16:36 秦こころ酱 阅读(164) 评论(0) 推荐(1) 编辑
摘要: 莫队裸题。。 #include<bits/stdc++.h> #define N 10005 using namespace std; int qid=0,tim=0,cx[1000005],res,block[N],ans[N],a[N]; struct ask{int l,r,t,id;}q[N 阅读全文
posted @ 2018-02-27 18:53 秦こころ酱 阅读(103) 评论(0) 推荐(0) 编辑
摘要: struct suffix_automaton { string s; int son[maxn][26],pre[maxn],step[maxn],last,total; inline void push_back(int v) { step[++total]=v; } void Extend(c 阅读全文
posted @ 2018-01-08 17:46 秦こころ酱 阅读(92) 评论(0) 推荐(0) 编辑
摘要: 我tm终于把三维偏序调对了 CDQ分治是一种进行计算时的降维手段,简单说大家都知道在进行一维偏序时我们只需要排序,二维偏序则可以用树状数组+排序,这之中树状数组就是一个降维手段,它将二维偏序降维,然后就可以用一维偏序做了。CDQ和树套树也是同理,以听说CDQ可以解决m维偏序,时间复杂度nlog(m- 阅读全文
posted @ 2017-12-14 14:52 秦こころ酱 阅读(156) 评论(0) 推荐(0) 编辑