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

字母树+dfs+快排,797ms(附解题报告)

Posted by yedeming at 2010-02-16 17:19:50 on Problem 2418
建一棵字母树(开20000即可),加入完所有字符串后dfs找出所有字符串,再排序(这时n<=30000)
O(l*n+l+mlog(m))
l指每个的长度平均数(小于30)
n指字符串个数(小于1000000)
m指种类(小于30000)

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