hdu 2328 Corporate Identity
摘要:
http://acm.hdu.edu.cn/showproblem.php?pid=2328题意:求多个字符串的最长公共子串,若有多个输出字典序最小。思路:先进行后缀数组操作。然后二分子串长度,根据height和sa数组的值,判断当前长度是否合适。当然,这里面还有hash映射的。View Code #include<stdio.h>#include<string.h>#include<stdlib.h>const int maxn = 910000;int wn[maxn],wa[maxn],wb[maxn],wv[maxn],as[maxn],sa[max 阅读全文
posted @ 2012-06-07 21:01 aigoruan 阅读(157) 评论(0) 推荐(0)