字符串hash

hash[i]=(hash[i-1]*p+idx(s[i]))%mod

p和mod取不同的较大的素数

posted @ 2017-09-03 16:59  Luke_Ye  阅读(128)  评论(0编辑  收藏  举报