![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
文章平均质量分 79
Lethelody
这个作者很懒,什么都没留下…
展开
-
BZOJ2006【主席树】【优先队列】
对于用RMQ写这道题的菊苣们无限仰慕./* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#includetypedef long long LL;typ原创 2015-03-31 23:07:24 · 651 阅读 · 0 评论 -
BZOJ3924【树链剖分】【线段树】
每次暴力转移重心./* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make(a,b) make原创 2015-05-01 23:44:22 · 708 阅读 · 0 评论 -
BZOJ4006【分块】
不会写hash表.于是就用hash_map卡过去了./* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #inclu原创 2015-05-04 16:02:48 · 708 阅读 · 0 评论 -
BZOJ2648/2716【KD tree】
2648这题卡常数.加了inline.开了内存池.卡时过掉了./* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#includetypedef long原创 2015-04-01 17:54:47 · 689 阅读 · 0 评论 -
BZOJ1758【点分治】【二分】【单调队列】
把二分放在点分治内会减小常数./* I will wait for you */ #include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make(a,b) make_pair(a原创 2015-04-11 11:33:28 · 457 阅读 · 0 评论 -
BZOJ4103【可持久化Tire】
/* I will wait for you*/ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #d原创 2015-06-10 11:57:02 · 670 阅读 · 0 评论 -
BZOJ1052【树状数组】
/* I will wait for you*/ #include #include #include #include #include #include #include #include #include #include #include #include原创 2015-06-12 14:54:51 · 512 阅读 · 0 评论 -
BZOJ1975【左偏树】
卡Priority_queue的内存简直是不忍直视./* I will wait for you */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #def原创 2015-07-12 11:35:38 · 1551 阅读 · 0 评论 -
POJ2449【A*算法】【可持久化左偏树】
K短路模板题.K很小所以A*就可以过了./* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define mak原创 2015-07-12 11:31:28 · 1519 阅读 · 0 评论 -
BZOJ3110【线段树】
写的是区间线段树套权值线段树.似乎比反过来写要麻烦.SAD.为了节省内存.内层的线段树要动态开点./* I will wait for you */ #include #include #include #include #include #include #include #include #include #include #include #include原创 2015-07-12 11:38:13 · 672 阅读 · 0 评论 -
BZOJ2809【左偏树】
/* I will wait for you */ #include#include#include#include#include#include#include#include#include#include#include#include#include#include typedef long long LL;typedef unsigned long原创 2015-03-31 00:43:49 · 589 阅读 · 0 评论 -
BZOJ1095【动态点分治】【优先队列】
学会了用priority_queue实现带删除操作的堆./* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #def原创 2015-04-30 15:26:45 · 488 阅读 · 0 评论 -
BZOJ2038【莫队算法】
/* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-05-05 11:09:06 · 393 阅读 · 0 评论 -
BZOJ4032【后缀自动机】【序列自动机】
原来还有序列自动机这种神奇的东西./* I will wait for you*/#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make ma原创 2015-05-04 17:09:59 · 1113 阅读 · 0 评论 -
BZOJ4034【树链剖分】【线段树】
/* I will wait for you */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #原创 2015-05-03 18:30:04 · 748 阅读 · 0 评论 -
BZOJ2555【SAM】【LCT】
裸的SAM暴力程序跑得很快./* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#define原创 2015-04-11 01:47:07 · 652 阅读 · 0 评论 -
BZOJ2738【整体二分】【树状数组】
/* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#define fi first#define原创 2015-04-11 20:36:28 · 586 阅读 · 0 评论 -
BZOJ2104【线段树】
很详细的题解:http://blog.csdn.net/iamzky/article/details/42119193要注意信息合并时.下标的先后顺序.很容易出错./* I will wait for you */ #include#include#include#include#include#include#include#include#include#incl原创 2015-04-11 19:33:48 · 991 阅读 · 0 评论 -
BZOJ3261【可持久化Tire】
可以运用前缀异或和的思想.将问题转化成在包含一个区间的Tire上贪心求解./* I will wait for you */ #include#include#include#include#include#include#include#include#include#include#include#include#include#include#define原创 2015-04-06 03:21:16 · 481 阅读 · 0 评论 -
BZOJ1112【splay】
对于一个给定的区间.其最优解一定是中位数.用splay维护区间的权值./* I will wait for you */ #include#include#include#include#include#include#include#include#include#include#include#include#include#include#define m原创 2015-04-08 00:31:16 · 736 阅读 · 0 评论 -
BZOJ1176【CDQ分治】【树状数组】
/* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#define fi first#define原创 2015-04-07 21:24:42 · 435 阅读 · 0 评论 -
BZOJ1113【单调栈】
/* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair#define fi first#define原创 2015-04-07 20:41:49 · 551 阅读 · 0 评论 -
BZOJ1057【单调栈】
无限仰慕KeyID讲的不用单调栈的方法./* I will wait for you */#include#include#include#includeusing namespace std;typedef long long LL;typedef unsigned long long ULL;typedef pair PII;const int maxn=2010原创 2015-04-12 11:18:47 · 464 阅读 · 0 评论 -
BZOJ1103【树状数组】
运用树的dfs序的性质差分.据说要写人工栈./* I will wait for you */#include#include#include#include#include#include#include#include#include#include#include#include#include#include#define make make_pair原创 2015-04-07 20:19:19 · 443 阅读 · 0 评论 -
BZOJ1131【树状数组】【deque】
/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define make make_pair#define fi原创 2015-04-14 23:57:18 · 379 阅读 · 0 评论 -
Codeforces 538F【可持久化线段树】
注意到两点:1.n个节点的完全K叉树中,有儿子的节点数量是O(n/k).而Hn是O(nlogn)的.2.每个节点的儿子是一段连续的区间,因此我们就可以用可持久化线段树来高效查找./* I will wait for you*/#include #include #include #include #include #include #include #include原创 2015-04-27 10:56:08 · 636 阅读 · 0 评论 -
HDOJ【5575】【单调栈】【可并堆】
好久木有做题啦!/* I will wait for you */#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define fi fi原创 2015-12-03 21:54:08 · 652 阅读 · 0 评论