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 |
俺用得ELF..但是跑了579ms..囧了In Reply To:我用的ELFhash也TLE了,下官方数据看了下,字符串都长的长不多“zaaabclnk zaaabclnl”(见内),这种情况下ELFhash是不是冲突会变得暴多?有没有用ELFhash过了? Posted by:bluewind at 2007-08-15 17:37:50 > int ELFhash(char *key){ > unsigned int g,h=0; > while(*key){ > h=(h<<4)+(*key++); > g=h & 0xf0000000L; > if (g) h^=g>>24; > h&=~g; > } > return h%M; > } > > zaaabclni zaaabclnj > zaaabclnk zaaabclnl > zaaabclnm zaaabclnn > zaaabclno zaaabclnp > zaaabclnq zaaabclnr > zaaabclns zaaabclnt > zaaabclnu zaaabclnv > zaaabclnw zaaabclnx > zaaabclny zaaabclnz > zaaabcloa zaaabclob > zaaabcloc zaaabclod > zaaabcloe zaaabclof > zaaabclog zaaabcloh > zaaabcloi zaaabcloj > zaaabclok zaaabclol > zaaabclom zaaabclon > zaaabcloo zaaabclop > zaaabcloq zaaabclor > zaaabclos zaaabclot > zaaabclou zaaabclov > zaaabclow zaaabclox > zaaabcloy zaaabcloz > zaaabclpa zaaabclpb > zaaabclpc zaaabclpd > zaaabclpe zaaabclpf > zaaabclpg zaaabclph > zaaabclpi zaaabclpj > zaaabclpk zaaabclpl > zaaabclpm zaaabclpn > zaaabclpo zaaabclpp > zaaabclpq zaaabclpr > zaaabclps zaaabclpt > zaaabclpu zaaabclpv > zaaabclpw zaaabclpx > zaaabclpy zaaabclpz > zaaabclqa zaaabclqb > zaaabclqc zaaabclqd > zaaabclqe zaaabclqf > zaaabclqg zaaabclqh > zaaabclqi zaaabclqj > zaaabclqk zaaabclql > zaaabclqm zaaabclqn > zaaabclqo zaaabclqp > zaaabclqq zaaabclqr > zaaabclqs zaaabclqt Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator