KMP
欧莎
啦啦啦,啦啦啦,让我们一起洗刷刷
展开
-
471D - MUH and Cube Walls (KMP)
Polar bears Menshykov and Uslada from the zoo of St. Petersburg and elephant Horace from the zoo of Kiev got hold of lots of wooden cubes somewhere. They started making cube towers by placing the cube原创 2016-12-04 20:50:42 · 242 阅读 · 0 评论 -
KMP 模板
KMP算法是快速字符串匹配算法 预处理函数:void getfill(string s) { memset(f,0,sizeof(f)); //根据其前一个字母得到 for(int i=1;i<s.size();i++) { int j=f[i]; while(j && s[i]!=s[j])原创 2016-07-29 16:27:12 · 209 阅读 · 0 评论 -
hdu 5763 Another Meaning(2016多校联赛)
http://acm.hdu.edu.cn/showproblem.php?pid=5763题目的意思是,给两个字符串a,b,其中b串有两种意思,如果b是a的子串问a串表达几种意思,其中的“hehe”的 号表示的是b串 。 思路:我在比赛的时候做的时候,知道用KMP,但是呢,不知道中间的该怎么办,我就试着需找规律,但是规律我找的还是错的,后来,比赛结束后就看的题解,理解后,自己打出来的,但是呢,因原创 2016-07-29 17:31:54 · 289 阅读 · 0 评论