摘要:
POJ 3974 网上看到的O(n)的方法,Manacher算法,记录一下 1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <string.h> 4 5 #define MAX(a,b) (a>b?a:b) 6 #define MIN(a,b) (a<b?a:b) 7 8 #define M 1000000 9 #define N (M+1)*210 11 char input[M+1];12 char str[N];13 int p[N];14 15 int main()16 {17 阅读全文
posted @ 2012-05-07 14:50
无啦啦
阅读(106)
评论(0)
推荐(0)