字符串
Lyang0.0
这个作者很懒,什么都没留下…
展开
-
G - Palindrome(Manacher1)
Andy the smart computer science student was attending an algorithms class when the professor asked the students a simple question, "Can you propose an efficient algorithm to find the length of the lar...原创 2019-08-03 16:15:24 · 130 阅读 · 0 评论 -
H - 吉哥系列故事——完美队形II(Manacher2)
吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变,且必须都是在原队形中连续的; 2、左右对称,假设有m个人形成新的队形,则第1个人和第m个人身高相同,第2个人和第m-...原创 2019-08-03 16:43:17 · 158 阅读 · 0 评论 -
I - Girls' research(Manacher3)
One day, sailormoon girls are so delighted that they intend to research about palindromic strings. Operation contains two steps: First step: girls will write a long string (only contains lower case) ...原创 2019-08-03 17:13:13 · 150 阅读 · 0 评论 -
J - Making Huge Palindromes(Manacher4)
A string is said to be a palindrome if it remains same when read backwards. So, 'abba', 'madam' both are palindromes, but 'adam' is not. Now you are given a non-empty stringS, containing only lowerc...原创 2019-08-05 08:07:51 · 186 阅读 · 0 评论 -
K - Keywords Search(AC自动机1)
In the modern time, Search engine came into the life of everybody like Google, Baidu, etc. Wiskey also wants to bring this feature to his image retrieval system. Every image have a long description,...原创 2019-08-05 08:55:27 · 120 阅读 · 0 评论 -
SDUT - Polycarp and Letters
题目描述 Polycarp loves lowercase letters and dislikes uppercase ones. Once he got a string s consisting only of lowercase and uppercase Latin letters. Let A be a set of positions in the string. Let’s cal...原创 2019-01-21 09:36:24 · 183 阅读 · 0 评论 -
Z - 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...原创 2019-08-10 14:42:56 · 139 阅读 · 0 评论 -
A - A Secret(扩展KMP)
Today is the birthday of SF,so VS gives two strings S1,S2 to SF as a present,which have a big secret.SF is interested in this secret and ask VS how to get it.There are the things that VS tell: Suff...原创 2019-08-10 16:06:38 · 254 阅读 · 0 评论 -
P1553 数字反转(升级版)(字符串 模拟)
题目链接:https://www.luogu.org/problem/P1553 思路概括:找到符号的位置标记,先反转前面的部分,再反转后面的部分 真的是改bug改到吐血 给大家列几个把我卡掉的样例(血与眼泪的经历) 0.0000 -> 0.0 1234567890/1234567890 -> 987654321/987654321 ...原创 2019-08-22 09:25:41 · 185 阅读 · 0 评论