
KMP
team39
喜欢写注释
展开
-
A - Number Sequence (KMP)
A - Number Sequence Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which m...原创 2018-07-17 09:03:25 · 895 阅读 · 0 评论 -
G - Power Strings (KMP——最小循环节)
G - Power Strings 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, ex...原创 2018-07-17 15:46:11 · 203 阅读 · 0 评论 -
J - Simpsons’ Hidden Talents
J - Simpsons’ Hidden Talents Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for example. I want to find o...原创 2018-07-18 11:45:53 · 218 阅读 · 0 评论 -
M - Substrings (KMP ——暴力枚举)
M - Substrings You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given...原创 2018-07-20 10:04:10 · 826 阅读 · 0 评论 -
Q - Period II
Q - Period II For each prefix with length P of a given string S,if S[i]=S[i+P] for i in [0..SIZE(S)-p-1], then the prefix is a “period” of S. We want to all the periodic prefixs. Input Input cont...原创 2018-07-20 11:43:30 · 311 阅读 · 0 评论