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

Re:本题5种解法:qsort,qsort+bsearch,trie,hash,map (内详)

Posted by Juwend at 2009-04-19 00:49:38 on Problem 2503
In Reply To:本题5种解法:qsort,qsort+bsearch,trie,hash,map (内详) Posted by:scat at 2008-07-19 19:51:10
> 将字典和查询合并之后qsort一次,O((m+n)*log(m+n))
> 3679201 scat 2503 Accepted 6108K 891MS C++ 994B 2008-07-19 19:09:29 
> 
> 将字典qsort,每次查询时bsearch,O((m+n)logm)
> 2878665 scat 2503 Accepted 2356K 343MS GCC 220B 2007-11-07 12:54:56 
> 
> TRIE,O(m*len+n*len)
> 2798315 scat 2503 Accepted 13512K 125MS C 973B 2007-10-18 02:10:12 
> 
> hash
> 2799032 scat 2503 Accepted 3600K 156MS C 1323B 2007-10-18 12:13:08 
> 
> map
> 3635793 scat 2503 Accepted 15428K 1860MS G++ 259B 2008-07-14 22:00:57 
ri

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