字符串哈希模板

#include
#include
#include
#include
#include
#include
#include
#include
#include
#define INF  0x3f3f3f3f
#define MAXN 1000
#define P 13331   ///可自定义大小
using namespace std;
typedef unsigned long long ull;
typedef long long ll;
const int maxn=1e5+5;
ull hash[maxn],p[maxn];///p[]为p的n次方
void init()
{
    p[0]=1;
    for(int i=0;i

转载于:https://www.cnblogs.com/megadeth/p/11332719.html

你可能感兴趣的:(字符串哈希模板)