kmp
文章平均质量分 74
kmp
分你半口奶盖
这个作者很懒,什么都没留下…
展开
-
A - Seek the Name, Seek the Fame
The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the same time seek the fame. In order to escape from such boring job, the inn原创 2021-07-19 11:06:59 · 114 阅读 · 0 评论 -
H - Simpsons’ Hidden Talents(kmp应用)
题目 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 out if I have a talent in politics, OK? Marge: OK. Homer: So I take some politician’s na原创 2021-07-19 16:04:03 · 81 阅读 · 0 评论 -
B - Power Strings(kmp应用 求最小循环节有几个)
题目 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-negative integer is defined in the normal way: a^0 =原创 2021-07-19 16:16:18 · 91 阅读 · 0 评论 -
I - Cyclic Nacklace(kmp模板题)⭐⭐⭐
题目 CC 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 thinking about how to tide over the last days. Being inspired by the entr原创 2021-07-19 19:29:04 · 75 阅读 · 0 评论 -
D - Period⭐⭐
题目 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 <= i <= N) we want to know the largest K >原创 2021-07-20 15:34:45 · 134 阅读 · 0 评论 -
E - 剪花布条(kmp经典模板题)⭐
题目 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Output 输出能从花纹布中剪出的最多小饰条个数,如果一块都没有,那就老老实实输出0,每个结果之间应换行。 Sa..原创 2021-07-20 15:44:53 · 102 阅读 · 0 评论 -
F - Oulipo(kmp经典模板题)!!!
The 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, mais tout s’affirmait faux. Tout avait Fair normal, d’abord, puis sur原创 2021-07-20 15:55:10 · 119 阅读 · 0 评论