模板
Rainbow6174
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Splay模板 初步修改完成
不算很慢= =也谈不上快 反正我觉得挺好记的…#include<iostream>#include<stdio.h>#include<string.h>#define INF 0x3f3f3f3fusing namespace std;const int maxn=500005;int n,m,r,c,pos,tot,temp;int val[maxn],fa[maxn],ch[ma原创 2016-01-05 21:06:14 · 841 阅读 · 0 评论 -
KMP模板
vim用起来略爽233333感觉代码不是同一个人写的了 这个版本kmp是说要手动统计length,然后next[]是从1开始…因为比较好用,很多时候不用特判(特判的时候比较方便)#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int maxn = 100005;int next原创 2016-03-02 15:25:31 · 398 阅读 · 0 评论 -
后缀数组suffix模板
25min默完,漏掉了一些p=n时的小优化…还有m=p的常数优化 好在主体没什么问题,看来还是不够熟悉#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int maxn = 100005;int sa[maxn], Rank[maxn], height[maxn];int wa原创 2016-03-02 20:54:15 · 621 阅读 · 0 评论 -
AC自动机模板
啦啦啦二十分钟默出来编译通过,一会去试几道题好啦#include <iostream>#include <cstdio>#include <cstring>using namespace std;const int maxn = 10005;const int maxm = 100;int n, tot, temp;int ch[maxn][maxm], fail[maxn], fla原创 2016-03-02 15:49:45 · 569 阅读 · 0 评论
分享