字符串-kmp
长沙大学ccsu_deer
这个作者很懒,什么都没留下…
展开
-
牛客小白月赛19(A,B(DP),C(二维前缀和),D(水),E(结论),F(kmp+hash),G(水dfs))
题目连接:https://ac.nowcoder.com/acm/contest/2272#questionA水题一个#include<bits/stdc++.h>#define rep(i,a,b) for(int i=a;i<=(b);++i)#define mem(a,x) memset(a,x,sizeof(a))#define pb push_back...原创 2019-11-24 12:44:39 · 321 阅读 · 0 评论 -
救救企鹅(KMP)
链接:https://ac.nowcoder.com/acm/contest/372/C来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述另一天,一只可爱的围着围巾的肥企鹅在路上摇摇晃晃地走着,遇上了迎面走来的打着饱嗝的PM6。小企鹅预感不妙,这不就是最近有名...原创 2019-02-24 10:20:34 · 611 阅读 · 0 评论 -
J - 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: "abab...原创 2018-12-16 11:35:54 · 416 阅读 · 0 评论 -
I - 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 politics...原创 2018-12-16 11:32:52 · 352 阅读 · 0 评论 -
G - 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 th...原创 2018-12-16 11:27:47 · 364 阅读 · 0 评论 -
F - Power Strings
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-...原创 2018-12-16 11:16:34 · 351 阅读 · 0 评论 -
E - 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 ...原创 2018-12-16 11:13:21 · 330 阅读 · 0 评论 -
D - 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 how to...原创 2018-12-16 11:05:16 · 717 阅读 · 0 评论 -
C - 剪花布条
一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Output...原创 2018-12-16 10:53:02 · 524 阅读 · 0 评论 -
B - 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’...原创 2018-12-16 10:49:55 · 381 阅读 · 0 评论 -
A - Number Sequence (kmp)
A - 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 whic...原创 2018-12-16 10:47:55 · 416 阅读 · 0 评论 -
Binary String Matching(kmp)两种模板做法
Binary String Matching时间限制:3000 ms | 内存限制:65535 KB难度:3输入The first line consist only one integer N, indicates N cases follows. In each case, there are two lines, the first line gives the stri...原创 2018-08-07 15:27:16 · 300 阅读 · 0 评论