![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
kmp
剑断青丝i
世界上唯一可以阻止你前进的就是懒惰
展开
-
A + B for you again
Generally speaking, there are a lot of problems about strings processing. Now you encounter another such problem. If you get two strings, such as “asdf” and “sdfg”, the result of the addition between ...原创 2019-08-11 18:36:59 · 130 阅读 · 0 评论 -
Period-(kmp)详解
经过这段时间的学习,对kmp又有了更深的了解,于是就做了一道比较有水平的题,这道题呢其实也并不是一点理解,只是有些东西一时半会的不是那么容易想出来。好了下面来分享这道题吧。 题目描述: For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126,...原创 2019-07-30 15:28:10 · 305 阅读 · 0 评论 -
亲和串 ——kmp
人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长大了却不知道怎么去判断亲和串了,于是他只好又再一次来请教聪明且乐于助人的你来解决这个问题。 亲和串的定义是这样的:给定两个字符串s1和s2,如果能通过s1循环移位,使s2包含在s1中,那么我们就说s2 是s1的亲和串。 Input ...原创 2019-07-29 17:44:27 · 206 阅读 · 0 评论