Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

后缀数组, 怎样线性扫描求所有串的公共最长子串?我只会二分

Posted by zfy0701 at 2008-06-21 02:57:26 on Problem 3080 and last updated at 2008-06-21 12:24:09
据说可以建后缀数组后线性扫描做O(n)(n为字符串拼接后的总长)

但是我感觉实现起来很困难,我是模仿1743的思路二分求解的nlogn(在hgt数组大小>=k的连续段中查找有哪些串),而且我的二分也写得很不美观...

哪位高手来解释下怎样O(n)

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator