
字符串处理-manacher
字符串处理
Stephencurry‘s csdn
这个作者很懒,什么都没留下…
展开
-
Manacher(最长回文子串)
Manacher(最长回文子串)这个马拉车算法 Manacher‘s Algorithm 是用来查找一个字符串的最长回文子串的线性方法,由一个叫 Manacher 的人在 1975 年发明的,这个方法的最大贡献是在于将时间复杂度提升到了线性,这是非常了不起的。对于回文串想必大家都不陌生,就是正读反读都一样的字符串,比如 "bob", "level", "noon" 等等,那么如何在一个字符串中...转载 2019-07-17 09:15:12 · 394 阅读 · 1 评论 -
P3085(manacher 模板题)
P3085(manacher 模板题)题目链接:https://www.luogu.org/problemnew/show/P3805AC代码:#include <stdio.h>#include <math.h>#include <iostream>#include <string>#include <string.h&...原创 2019-07-17 09:57:53 · 131 阅读 · 0 评论 -
HDOJ-3068(最长回文)
HDOJ-3068(最长回文)给出一个只由小写英文字符a,b,c...y,z组成的字符串S,求S中最长回文串的长度.回文就是正反读都是一样的字符串,如aba, abba等Input输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c...y,z组成的字符串S两组case之间由空行隔开(该空行不用处理)字符串长度len <= 110000Outp...原创 2019-07-17 10:10:15 · 140 阅读 · 0 评论 -
吉哥系列故事——完美队形II (HDU-4513)
吉哥系列故事——完美队形II (HDU-4513) 吉哥又想出了一个新的完美队形游戏! 假设有n个人按顺序站在他的面前,他们的身高分别是h[1], h[2] ... h[n],吉哥希望从中挑出一些人,让这些人形成一个新的队形,新的队形若满足以下三点要求,则就是新的完美队形: 1、挑出的人保持原队形的相对顺序不变,且必须都是在原队形中连续的; 2、左右对称,假设有m个人形成新...原创 2019-07-19 16:14:17 · 311 阅读 · 9 评论 -
Girls' research (HDU-3294)
Girls' research (HDU-3294)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 strin...原创 2019-07-20 08:26:15 · 434 阅读 · 1 评论 -
Palindrome (POJ-3974)
Palindrome (POJ-3974)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 fin...原创 2019-07-20 10:02:54 · 131 阅读 · 0 评论