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

像这种需要大量判重的搜索, stl使用要慎重

Posted by tzkq at 2009-10-29 06:59:01 on Problem 1077
In Reply To:真不好意思说是用A*解决的,stl果然花时间 Posted by:mightyvoice at 2009-07-12 15:38:38
开始使用 set (rb tree) tl

后来改成 hash_set (hash) 勉强过,接近1000ms

然后自己写了个简单hash (开放寻址法) 又快了,100ms内

以上都是基于单向广搜, 看得出来stl的set效率不大理想, 那个gcc的hash也不怎么样




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