
字符串(KMP算法)
大橘为重eleven
每天都因为自己太菜了而自闭
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 make a[K] = b[1], a[K + 1]...原创 2019-08-28 20:12:56 · 1090 阅读 · 0 评论 -
How many
题目描述:Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell meHow many kinds of necklaces total have.(if two necklaces can equal by rotating ,we say the two neckla...原创 2019-08-30 09:37:14 · 320 阅读 · 0 评论 -
String Problem kmp+最大最小表示法
题目描述:Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strings:String RankSKYLONG 1KYLONGS 2YLONGSK ...原创 2019-08-30 09:31:20 · 203 阅读 · 0 评论 -
Blue Jeans
题目描述:The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was popula...原创 2019-08-28 20:59:49 · 260 阅读 · 0 评论 -
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 strings....原创 2019-08-28 21:20:44 · 192 阅读 · 0 评论 -
Corporate Identity
题目描述:Beside other services, ACM helps companies to clearly state their “corporate identity”, which includes company logo but also other signs, like trademarks. One of such companies is Internet Build...原创 2019-08-28 21:15:38 · 683 阅读 · 0 评论 -
Count the string
题目描述:It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example:s: ...原创 2019-08-28 21:10:22 · 262 阅读 · 0 评论 -
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 out if I have a talent in poli...原创 2019-08-28 21:04:00 · 195 阅读 · 0 评论 -
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 s...原创 2019-08-28 20:53:08 · 159 阅读 · 0 评论 -
Power Strings
题目描述:Given two strings a and b we define ab to be their concatenation. For example, if a = “abc” and b = “def” then ab = “abcdef”. If we think of concatenation as multiplication, exponentiation by a ...原创 2019-08-28 20:48:14 · 158 阅读 · 0 评论 -
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...原创 2019-08-28 20:43:28 · 220 阅读 · 0 评论 -
Cyclic Nacklace
题目描述: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 ...原创 2019-08-28 20:35:42 · 188 阅读 · 0 评论 -
剪花布条
题目描述:一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢?输入:输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。输出:输出能从...原创 2019-08-28 20:30:18 · 204 阅读 · 0 评论 -
Oulipo
题目描述: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 to...原创 2019-08-28 20:20:46 · 258 阅读 · 0 评论 -
Theme Section
题目描述:It’s time for music! A lot of popular musicians are invited to join us in the music festival. Each of them will play one of their representative songs. To make the programs more interesting and ...原创 2019-08-30 10:19:06 · 216 阅读 · 0 评论