
KMP
浅眠流转
这个作者很懒,什么都没留下…
展开
-
Count the string_HDU3336
文章目录[Count the string_HDU3336](http://acm.hdu.edu.cn/showproblem.php?pid=3336)题目大意解题思路代码Count the string_HDU3336题目大意一共有T组字符串,每组有一个长度为n的字符串。让你求这个字符串的每一个前缀串在这个字符串中出现的次数和是多少。解题思路我们对这个字符串进行KMP求出next数组,我们会发现,next[i] 表示的是,公共前缀子串的长度,进而对next数组的值作为线性DP的下标进行求解就原创 2020-10-10 12:24:50 · 244 阅读 · 0 评论 -
HDU-1711- Number Sequence
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 a[K] = b[1]...原创 2019-08-16 19:46:48 · 144 阅读 · 0 评论 -
HDU-2087- 剪花布条
剪花布条一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢?Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。Output...原创 2019-08-16 19:57:10 · 195 阅读 · 0 评论 -
HDU-3746-Cyclic Nacklace
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 think...原创 2019-08-16 20:07:33 · 146 阅读 · 0 评论 -
POJ-2752-Seek the Name, Seek the Fame
Seek the Name, Seek the FameThe 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,...原创 2019-08-16 20:18:51 · 142 阅读 · 0 评论 -
HDU-6740-J. MUV LUV EXTRA
HDU-6740-J. MUV LUV EXTRA题目MUV LUV EXTRATime Limit: 2000/1500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 520 Accepted Submission(s): 159Problem Descri...原创 2019-09-29 17:14:43 · 459 阅读 · 0 评论