
字符串
Yuer-
pku.
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Trie字典树【模板
刘汝佳版本字典树#include #include #include using namespace std;const int maxnode = 4000 * 100 + 10;const int sigma_size = 26;// 字母表为全体小写字母的Triestruct Trie { int ch[maxnode][sigma_size]; int val原创 2014-08-23 15:57:19 · 1683 阅读 · 0 评论 -
AC自动机模板 LA4670
出现次数最多的子串 n个小写字母组成的字符串和一个原创 2014-08-23 19:24:00 · 577 阅读 · 0 评论 -
存个KMP模板
KMP,假设文本是一个长度为n的字符串T,模板是一个长度为m的P,m<=n,求模板在文本中所有的匹配点。KMP首先用O(m)对模板进行预处理,然后用O(n)完成匹配。整体复杂度为O(m+n)。However,朴素算法对于数据它的表现非常好。 #include "cstdio"#include "iostream"#include "cstring"usi...原创 2014-04-23 06:59:18 · 673 阅读 · 1 评论