
KMP
文章平均质量分 74
Mr_Treeeee
这个作者很懒,什么都没留下…
展开
-
FZU 2275 Game (KMP)
Problem 2275 GameAccept: 99 Submit: 270Time Limit: 1000 mSec Memory Limit : 262144 KB Problem DescriptionAlice and Bob is playing a game.Each of them has a number. Alice’s nu原创 2017-07-27 21:56:12 · 1281 阅读 · 0 评论 -
2017年浙工大网络同步赛 - 栗酱的数列 (差分+KMP)
题目描述 栗酱有一个长度为n的数列A,一个长度为m的数列B,现在询问A中有多少个长度为m的连续子序列A',满足(a'1+b1)%k = (a'2+b2)%k = …… = (a'm + bm)%k。输入描述:第一行一个数T,表示有T组数据。对于每组数据,第一行三个整数,n, m, k。第一行输入n个数, a1,a2,…,an, 表示A数列中的数,第二行输入m个数, b1原创 2018-01-23 19:16:48 · 325 阅读 · 0 评论 -
Codeforces Beta Round #25 (Div. 2 Only) - E. Test (KMP)
E. Testtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSometimes it is hard to prepare tests for programmi原创 2017-12-07 23:10:01 · 237 阅读 · 0 评论 -
EOJ Monthly 2017.12 - G1. 唐纳德与子串 (Easy) (KMP)
G1. 唐纳德与子串 (Easy)Time limit per test: 1.0 secondsMemory limit: 256 megabytes子串的定义是在一个字符串中连续出现的一段字符。这里,我们使用 s[l…r] 来表示 s 字符串从 l 到 r(闭区间)的子串。在本题中,字符串下标从 0 开始。显然,对于长度为 n 的字符串共有 n(n+1)2原创 2017-12-08 22:18:47 · 328 阅读 · 0 评论 -
POJ 2406 - Power Strings(KMP)
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 51899 Accepted: 21642DescriptionGiven two strings a and b we define a*b to be their concate原创 2017-10-01 16:54:07 · 688 阅读 · 0 评论 -
2017 ACM-ICPC 亚洲区(乌鲁木齐赛区)网络赛 - G Query on a string (KMP+树状数组)
You have two strings SS and TT in all capitals.Now an efficient program is required to maintain a operation and support a query.The operation C i chC i ch with given integer ii and capital l原创 2017-09-17 23:34:03 · 482 阅读 · 0 评论 -
HDU 1711 Number Sequence(KMP)
Number SequenceTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 27986 Accepted Submission(s): 11777Problem DescriptionGiven t原创 2017-07-28 23:22:59 · 239 阅读 · 0 评论 -
HDU 3374 String Problem(最小表达法+kmp)
String ProblemTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3328 Accepted Submission(s): 1372Problem DescriptionGive you a原创 2017-08-20 17:15:15 · 333 阅读 · 0 评论 -
POJ 1961 Period(next数组求循环节)
PeriodTime Limit: 3000MS Memory Limit: 30000KTotal Submissions: 18549 Accepted: 9013DescriptionFor each prefix of a given string S with N characters (each chara原创 2017-08-20 17:10:06 · 295 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第三场) - E Sort String (next数组求最小循环节)
题意:字符串i:suffix(i)+prefix(i-1).把这0到n-1个字符串分组。完全一样的分为一组。按照字符串标号,一组一组输出。 POINT:找规律可得,只要找出最小循环节的长度,答案就确定了。之前用后缀数组写的,然后tle,所以输出了一些字符串找到了规律。 #include <cstdio>#include <cstring&g...原创 2018-07-27 13:32:02 · 250 阅读 · 0 评论