Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
第一次bsearch折腾了好久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 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator