后缀数组(SA)
摘要:倍增、DC3、前缀Hash值+sort+二分
阅读全文
posted @
2022-03-12 11:15
我疯故我在
阅读(25)
推荐(0) 编辑
字符串Hash
摘要:一维字符串Hash unsigned long long f[N],p[N];//字符串前缀哈希值;p进制,一般取131,13331; unsigned long long get_hash(int l,int r) { return f[r]-f[l-1]*p[r-l+1]; } p[0]=1;
阅读全文
posted @
2022-03-12 11:04
我疯故我在
阅读(45)
推荐(0) 编辑