Manacher(马拉车)
纵马且长歌
贪心过样例,暴力出奇迹,骗分最神奇,打表进省一
展开
-
Gym_101350I_Mirrored String II_回文字符串(马拉车Manacher)
Note: this is a harder version of Mirrored string I. The gorillas have recently discovered that the image on the surface of the water is actually a reflection of themselves. So, the next thing for th原创 2017-04-20 23:27:39 · 379 阅读 · 0 评论 -
Manacher讲解(及自己的功课笔记)
转载博文出处:原博文网址 http://blog.csdn.net/dyx404514/article/details/4206101 Manacher算法 算法总结第三弹 manacher算法,前面讲了两个字符串相算法——kmp和拓展kmp,这次来还是来总结一个字符串算法,manacher算法,我习惯叫他 “马拉车”算法。 相对于前面介绍的两个算法,Manac转载 2017-04-22 19:54:21 · 114 阅读 · 0 评论 -
hdu3068_最长回文串_Manacher(马拉车模板)
最长回文 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 20742 Accepted Submission(s): 7522 Problem Description 给出一个只由小写英文字符a,b,c...y,z组原创 2017-04-22 20:21:56 · 467 阅读 · 0 评论 -
hdu3294_Girls' research_Manacher(马拉车算法)
Girls' research Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2313 Accepted Submission(s): 887 Problem Description One day, sailor原创 2017-04-23 19:30:16 · 105 阅读 · 0 评论 -
2017东北四省赛G题
题意: 大概记得题意是说,给你一个a,b,再给你一个串,将这个串里字符下标mod a==b的字符重新组成一个新串,求新串的最大回文串是多长。 解: 就是整理下新串,用马拉车解决掉,但这样会超时,亲测有效,需要将计算过的a,b及对应的长度记下来,以缩短时间。(记忆化马拉车?) 比赛的时候硬是没想出来,最后知道记忆化存储就能解决真想撞死南墙= =。 代码: #include #inclu原创 2017-05-24 19:36:21 · 849 阅读 · 1 评论 -
poj3974_Palindrome_
Palindrome Time Limit: 15000MS Memory Limit: 65536K Total Submissions: 8974 Accepted: 3376 Description Andy the smart computer science student was attending an algo原创 2017-04-24 16:50:22 · 816 阅读 · 0 评论 -
hdu5371_Hotaru's problem_Manacher
Hotaru's problem Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 3479 Accepted Submission(s): 1144 Problem Description Hotaru Ichijo原创 2017-04-27 16:05:54 · 343 阅读 · 0 评论 -
hdu4513_吉哥系列故事――完美队形II_Manacher的数组用法
吉哥系列故事——完美队形II Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 2879 Accepted Submission(s): 1121 Problem Description 吉哥又想出了一个新的完美队原创 2017-04-22 21:41:52 · 216 阅读 · 0 评论 -
Gym_100971k_Palindromization (回文串)
Mihahim has a string s. He wants to delete exactly one character from it so that the resulting string would be a palindrome. Determine if he can do it, and if he can, what character should be deleted.原创 2017-05-19 10:29:46 · 311 阅读 · 0 评论