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/map到util.Map到ext/hash_map, 最后写了一个hash, 以及2x次的wa/re/ce/tle/mle...

Posted by tzkq at 2010-07-29 15:18:07 on Problem 2785
In Reply To:换了个hash函数终于过了~~ Posted by:cppb at 2007-04-08 00:24:23
stl/map必然超时,它是log(n)查询,4000*4000*log(4000*4000)=近4亿,空循环都得几秒

util.Map, tree/hash都试过, 总是re... 搞不懂, 问题可能出在内存上, 总之很疑惑

namespace __gnu_cxx下的ext/hash_map,ce; namespace stdext下的hash_map,tle


头痛呀, 自己写了个开放列表,M模取到25000003, hash函数:abs(n)%M, tle了


心灰意冷, 随手改了一下abs(n<<7)%M,4xxxMS, abs(n<<3)%M,38xxMS, abs(n<<17)%M,re



我就捉摸着, 这数据可能刻意设计了的, 专灭简单的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