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 |
Re:4860ms....我怀疑我写的到底是不是BST..In Reply To:4860ms....我怀疑我写的到底是不是BST.. Posted by:ARA at 2010-05-16 08:41:55 改成 Hash 后只有 800ms!!!!!!ORZ!!! function BKBHash(t: tstr): longint; const dumb_seed = 131313; var l, i, result: longint; begin l := length(t); result := 0; for i := 1 to l do result := (result * dumb_seed + ord(t[i])) and $7fffffff; result := result mod magic_seed; exit(result); end; magic_seed 请自己 YY Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator