
manacher
nike0good
这个作者很懒,什么都没留下…
展开
-
回文(manacher)
裸manacher我竟然写跪了…………一个地方(偶数)没写清楚……我OOXOXOXOXXOXO#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define For(i,n) for(int i=1;i<=n;原创 2013-07-06 15:16:56 · 1640 阅读 · 0 评论 -
LA 4975(Casting Spells-manacher+暴力查找)
4975 - Casting SpellsTime limit: 3.000 seconds Casting spells is the least understood technique of dealing with real life. Actually, people find it quite hard to distinguish between a real spe原创 2015-04-10 22:26:41 · 1568 阅读 · 0 评论 -
HDU 3068(最长回文-manacher)[Template:manacher]
最长回文Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9660 Accepted Submission(s): 3353Problem Description给出一个只由小写英文字符a,b,c...y,z组成原创 2015-04-06 19:27:42 · 991 阅读 · 0 评论 -
HDU 5371(Hotaru's problem-2次回文串)
Hotaru's problemTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2432 Accepted Submission(s): 841Problem DescriptionHotaru Ichijou原创 2015-08-26 20:22:02 · 1197 阅读 · 0 评论 -
BZOJ 2342([Shoi2011]双倍回文-manacher+set)
N<=500000显然wwRwwRww^Rww^R 本身就是偶数回文串 设它为(x−2l+1,x−l),(x−l+1,x),(x+1,y),(x+l+1,x+2l)(x-2l+1,x-l),(x-l+1,x),(x+1,y),(x+l+1,x+2l) 枚举这个回文串的中点xx,找最大的y使y−py≤x且x≤y≤x+px/2y-p_y \leq x 且 x \leq y \leq x+p_x /原创 2015-10-13 14:44:50 · 1010 阅读 · 0 评论