字符串-KMP
Mitsuha_
Rush to the dead summer
展开
-
hihocoder#1807 : 好的数字串(DP+KMP)
时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 给定一个数字字符串S,如果一个数字字符串(只包含0-9,可以有前导0)中出现且只出现1次S,我们就称这个字符串是好的。 例如假设S=666,则1666、03660666是好的,6666、66、123不是好的;假设S=1212,则01212、12123是好的,121212、121是不好的。请你计算长度为N...原创 2018-08-27 14:53:26 · 317 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第九场)F:Typing practice(优化后的KMP)
链接:https://www.nowcoder.com/acm/contest/147/F时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld 题目描述 Niuniu is practicing typing.Given n words, Niuniu want to input one...原创 2018-08-17 16:16:33 · 312 阅读 · 0 评论 -
Codeforces-1017E:The Supersonic Rocket(凸包+KMP)
E. The Supersonic Rocket time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output After the war, the supersonic rocket became the most common publi...原创 2018-08-09 09:42:45 · 386 阅读 · 0 评论 -
Codeforces-1015F:Bracket Substring(DP+KMP)
F. Bracket Substring time limit per test1 second memory limit per test 256 megabytes inputstandard input outputstandard output You are given a bracket sequence s (not necessarily a regular one). ...原创 2018-08-03 17:09:43 · 647 阅读 · 0 评论 -
HDU-4763:Theme Section(KMP)
Theme Section Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) ...原创 2018-07-27 16:16:46 · 155 阅读 · 0 评论 -
Codeforces-182D:Common Divisors(KMP)
Codeforces-182D:Common Divisors(KMP)Vasya has recently learned at school what a number's divisor is and decided to determine a string's divisor. Here is what he came up with.String a is the divisor of string b if and only if there exists a positive integer原创 2017-12-22 10:16:51 · 842 阅读 · 0 评论 -
HDU-5918:Sequence I(KMP)
HDU-5918:Sequence I(KMP)Mr. Frog has two sequences a1,a2,⋯,an and b1,b2,⋯,bm and a number p. He wants to know the number of positions q such that sequence b1,b2,⋯,bm is exactly the sequence aq,aq+p,aq+2p,⋯,aq+(m−1)p where q+(m−1)p≤n and q≥1.原创 2017-10-14 12:14:53 · 322 阅读 · 0 评论