字符串
文章平均质量分 82
miao_2cm
这个作者很懒,什么都没留下…
展开
-
HDU 5319_Painter
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 898 Accepted Submission(s): 410Problem DescriptionMr. Hdu is an painter, as we原创 2015-07-31 10:28:30 · 310 阅读 · 0 评论 -
Codeforces Round #367 (Div. 2) C. Hard problem(dp)
time limit per test1 second memory limit per test256 megabytesVasiliy is fond of solving different tasks. Today he found one he wasn’t able to solve himself, so he asks you to help.Vasiliy is given n原创 2016-08-12 19:43:52 · 335 阅读 · 0 评论 -
HDU 4763 Theme Section(kmp)
Time Limit:1000MS Memory Limit:32768KBDescription 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 s原创 2016-08-23 15:54:10 · 311 阅读 · 0 评论 -
Manacher算法
Manacher算法是专门用来处理回文的一种算法,其主要的作用是找出一个字符串里面最长的一个回文。要用到这个算法,首先要做的就是改变原来的字符串,就是在原有的字符串中,每两个字母之间都插入一个字符串里面没有的符号。比如:如果这个字符串是由26位字母组成的,那么就在第一个字母前和最后一个字母的后面以及每两个中间都插入一个#。举个栗子:s[]=”aaaaa”,那么这个字符串就改成:s[]=”#a#a#a原创 2016-08-21 21:17:10 · 333 阅读 · 0 评论 -
HDU 3068 最长回文(Manacher算法)
Time Limit:2000MS Memory Limit:32768KBDescription 给出一个只由小写英文字符a,b,c…y,z组成的字符串S,求S中最长回文串的长度. 回文就是正反读都是一样的字符串,如aba, abba等Input 输入有多组case,不超过120组,每组输入为一行小写英文字符a,b,c…y,z组成的字符串S 两组case之间由空行隔开(该空行不原创 2016-08-21 20:21:35 · 302 阅读 · 0 评论 -
HDU 3374 String Problem(最大最小表示法+kmp)
Time Limit:1000MS Memory Limit:32768KBDescription Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven s原创 2016-08-17 16:11:11 · 405 阅读 · 0 评论 -
HDU 4300 Clairewd’s message(kmp)
Time Limit:1000MS Memory Limit:32768KBDescription Clairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing for sending it原创 2016-08-16 10:38:23 · 245 阅读 · 0 评论 -
HDU 2594 Simpsons’ Hidden Talents(kmp)
Time Limit:1000MS Memory Limit:32768KBDescription 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 ex原创 2016-08-15 19:42:40 · 223 阅读 · 0 评论 -
Codeforces Round #324 (Div. 2) C. Marina and Vasya
time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMarina loves strings of the same length and Vasya loves when ther原创 2015-10-11 20:05:57 · 376 阅读 · 0 评论 -
Codeforces Round #316 (Div. 2) C. Replacement
time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputDaniel has a string s, consisting of lowercase English letters a原创 2015-08-14 16:00:55 · 284 阅读 · 0 评论 -
POJ 3080 Blue Jeans(暴力枚举+kmp)
Time Limit: 1000MS Memory Limit: 65536KDescription The Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousan原创 2016-08-15 14:11:12 · 250 阅读 · 0 评论