![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
字符串
文章平均质量分 92
___fouzhe
这个作者很懒,什么都没留下…
展开
-
KMP模板
如题,模板如下:void getFail(char* P,int* f) { int m=strlen(P); f[0]=0;f[1]=0; for(int i=1;i<m;i++) { int j=f[i]; while(j&&P[i]!=P[j]) j=f[j]; f[i+1]=P[i]==P[j]? j+1:0;原创 2016-07-30 21:20:16 · 244 阅读 · 0 评论 -
SPOJ-STC02 - Antisymmetry(双hash,回文典型做法)
题目链接 STC02 - Antisymmetry no tags Byteasar studies certain strings of zeroes and ones. Let S be such a string. By Sr we will denote the reversed (i.e., "read backwards") string S,原创 2017-01-24 20:28:58 · 481 阅读 · 0 评论 -
AC自动机模版
新年第一天,就贴个AC自动机模版吧~ 2017,加油! const int MAX_Tot=5e5+100; struct Aho { struct state { int next[26]; int fail,cnt; }stateTable[MAX_Tot]; int size; queue que原创 2017-01-28 20:11:09 · 691 阅读 · 0 评论 -
Educational Codeforces Round 17 C. Two strings(字符串前缀后缀处理,好题)
C. Two strings time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given two strings a and b. You hav原创 2017-02-15 09:22:31 · 816 阅读 · 0 评论