
KMP
文章平均质量分 74
Aurum_potestas_est
这个作者很懒,什么都没留下…
展开
-
POJ2406
Given two strings a and b we define a*b to be their concatenation. For example, if a = “abc” and b = “def” then a*b = “abcdef”. If we think of concatenation as multiplication, exponentiation by a non-n原创 2017-09-23 21:32:14 · 264 阅读 · 0 评论 -
POJ1961Period
For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2 <原创 2017-09-25 23:23:11 · 354 阅读 · 0 评论 -
HDU2594 Simpsons’ Hidden Talents
Input Input consists of two lines. The first line contains s1 and the second line contains s2. You may assume all letters are in lowercase. Output Output consists of a single line that contains the原创 2017-10-07 19:12:24 · 381 阅读 · 0 评论 -
uva 12012 - Detection of Extraterrestrial(KMP)
Input The first line contains T, the number of test cases (T ≤ 200). Most of the test cases are relatively small. T lines follow, each contains a string of only small latin letters ’a’ - ’z’, whose l原创 2017-10-07 19:29:30 · 465 阅读 · 0 评论 -
kmp模板
#include<stdio.h>#include<algorithm>#include<math.h>#include<string.h>#include<iostream>using namespace std;char s[1000005];char t[1000005];int nextval[1000005];...原创 2018-03-06 22:02:31 · 383 阅读 · 0 评论