
KMP|扩展KMP|Manacher
文章平均质量分 72
YOONGI
这个作者很懒,什么都没留下…
展开
-
Cyclic Nacklace (KMP 最小循环节)
Cyclic NacklaceCC 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 thin...原创 2018-08-09 09:56:39 · 172 阅读 · 0 评论 -
Period (KMP 循环节)
PeriodFor 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 ea...原创 2018-08-09 11:25:37 · 294 阅读 · 0 评论 -
Power Strings(KMP 循环节)
Power StringsGiven 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, exponenti...原创 2018-08-09 11:45:34 · 225 阅读 · 0 评论 -
Number Sequence (KMP模板题)
Number SequenceGiven 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 make ...原创 2018-08-07 10:31:02 · 503 阅读 · 0 评论 -
Oulipo(KMP)
OulipoThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mai...原创 2018-08-07 10:40:01 · 123 阅读 · 0 评论 -
剪花布条
剪花布条一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 O...原创 2018-08-07 10:51:39 · 225 阅读 · 0 评论 -
SCU - 4438 Censor (KMP)
Censorfrog is now a editor to censor so-called sensitive words (敏感词).She has a long textpp. Her job is relatively simple -- just to find the first occurence of sensitive wordwwand remove it.f...原创 2019-04-24 14:52:59 · 9578 阅读 · 0 评论 -
The Preliminary Contest for ICPC Asia Xuzhou 2019 D. Carneginon (KMP)
D. Carneginon题目链接:https://nanti.jisuanke.com/t/41386题目大意:给一个母串T,接下来给n个串S,如果S的长度与T的长度相等:如果S与T串相同,输出:jntm!,否则输出:friend!, 如果S的长度比T小,如果S是T的子串,输出:my child!,否则输出:oh, child! , 如果S的长度比T大,如果T是S的子串,输出:my t...原创 2019-09-07 20:04:31 · 123 阅读 · 0 评论 -
Gym - 101981 Problem M. Mediocre String Problem (扩展KMP + Manacher)
Problem M. Mediocre String Problem题目链接:https://vjudge.net/problem/Gym-101981M题目大意:给出两个串S,T,从S中选择 i~j 的子串,再从T中选择前缀 1~k 接在S的子串后面 组成一个新字符串,要求 j-i+1>k,问能构成的新串中是回文串的个数思路:因为要求j-i+1>k,即S中选择的子串x比...原创 2019-09-25 21:34:02 · 545 阅读 · 0 评论