KMP
Ray.C.L
不开longlong见祖宗
展开
-
831.KMP字符串(AcWing)
KMP模板题 #include <iostream> #include <cstdio> #include <fstream> #include <algorithm> #include <cmath> #include <deque> #include <vector> #include <queue...原创 2020-04-29 10:36:04 · 201 阅读 · 0 评论 -
Oulipo (kmp模板)
emmm。。。求子串在母串的出现次数先输入子串后输入母串,KMP模板。 // ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include <cstdio> #include <fstream> #include <algorithm&g...原创 2019-08-05 20:28:18 · 182 阅读 · 0 评论 -
Number Sequence HDU - 1711(KMP模板)
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] = b[2...原创 2019-08-08 10:14:27 · 368 阅读 · 1 评论 -
Cyclic Nacklace HDU - 3746(KMP中对next数组的理解)
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...原创 2019-08-08 11:17:24 · 301 阅读 · 0 评论 -
power strings(对next数组的理解)
E - 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, exponent...原创 2019-08-06 14:42:02 · 208 阅读 · 0 评论 -
count the string(next数组理解)
emmm…求前缀后缀公共子串出现了几次也就是求next数组不为0出现 了几次再加上自己的串长。(之前用了几个strlen获取串承长TLE了几次猛然发现题目给了串长…我好菜啊Orz) // ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include <iostream> #include <c...原创 2019-08-06 14:40:21 · 772 阅读 · 2 评论 -
Seek the Name, Seek the Fame POJ - 2752
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 th...原创 2019-08-08 20:56:33 · 199 阅读 · 0 评论 -
Theme Section(KMP对next数组理解)
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 challe...原创 2019-08-07 10:47:11 · 263 阅读 · 0 评论