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:用一个灰常简洁的hash就可以到800+ms的。。。。。In Reply To:用一个灰常简洁的hash就可以到800+ms的。。。。。 Posted by:talenth1 at 2011-09-12 18:21:50 > int hash(int x) > { > int sum=0; > for(int i=2;i<=k;++i){ > sum*=ha; > sum+=a[x][i]; > sum%=hm; > if(sum<0)sum+=hm; > } > return sum; > } > > //hm=100003,ha=41 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator