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 |
竟然是直接nc进制数hash!!!!In Reply To:这道题的NC到底有什么用?我用hash过的,用的是lrj书上的hash函数,但是很慢,是不是需要设计和NC有关的hash函数? Posted by:firefox at 2005-09-20 18:07:06 > unsigned int hash(char*key){ > unsigned long h=0; > while(*key){ > h=(h<<4)+*key++; > unsigned long g=h&0xf0000000L; > if(g)h^=g>>24; > h&=~g; > } > return h%NHASH; > } Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator