.....KMP
qq_36424540
这个作者很懒,什么都没留下…
展开
-
Cyclic Nacklace HDU - 3746
CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to...原创 2017-09-18 23:51:32 · 347 阅读 · 0 评论 -
字符串匹配的KMP算法
字符串匹配是计算机的基本任务之一。 举例来说,有一个字符串"BBC ABCDAB ABCDABCDABDE",我想知道,里面是否包含另一个字符串"ABCDABD"? 许多算法可以完成这个任务,Knuth-Morris-Pratt算法(简称KMP)是最常用的之一。它以三个发明者命名,起头的那个K就是著名科学家Donald Knuth。 下面,我用自己的语言,试图写一篇比...转载 2017-09-03 23:42:24 · 210 阅读 · 0 评论 -
C - Censor SCU - 4438
Censorfrog is now a editor to censor so-called sensitive words (敏感词).She has a long text p. Her job is relatively simple -- just to find the first occurence of sensitive word wand remove it.frog...原创 2018-05-04 20:33:21 · 14858 阅读 · 0 评论 -
Typing practice
链接:https://www.nowcoder.com/acm/contest/147/F来源:牛客网 题目描述Niuniu is practicing typing.Given n words, Niuniu want to input one of these. He wants to input (at the end) as few characters (without b...原创 2018-08-17 14:11:58 · 2691 阅读 · 0 评论 -
B. Segment Occurrences
You are given two strings s and t, both consisting only of lowercase Latin letters.The substring s[l..r]is the string which is obtained by taking characters sl,sl+1,…,srwithout changing the or...原创 2018-08-17 15:11:31 · 471 阅读 · 0 评论