- 博客(7)
- 收藏
- 关注
原创 字符串专题 kmp-trie-ac
kmp与trie模板网上很多就不附了。 poj2406 简单的kmp,考察next[]找循环周期的性质。 bzoj3670 复杂的kmp,需要 有趣 的变形。 poj3630 简单的trie树,寻找前缀的关系。 poj1451 复杂的trie树,模拟手机T9输入法,细节刁钻。 hdu4757 可持久化trie,小心慎入! AC自动机:在trie上建立fail[](即next)进行的多
2016-03-02 17:11:56
535
原创 splay 模板
#include <iostream> #include <cstdio> #include <cstdlib> #include <algorithm> #include <cstring> #include <cmath> using namespace std; #define rt ch[root][1] #define lrt ch[rt][0] #define ls ch[x][0] #
2015-12-23 20:53:07
298
原创 NOI2015 软件包管理器 树剖+线段树
#include<iostream> #include<vector> #include<stdio.h> #define ls (id*2) #define rs (id*2+1) using namespace std; vector<int> lin[100005]; int in[100005],size[100005],fa[100005],top[100005],n,num,ans; s
2015-12-11 17:05:52
350
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人