POJ3461 字符串hash

//为了防止冲突,使用了双hash
#include
#include
#include
#include
#include
#define ull unsigned long long
const ull B=1e8+7,C=1e8+119;
const int dmax=1000100;
char s[dmax],s1[dmax];

int hash(char *a,char *b){
	int ans=0,i;
	ull x=strlen(a),y=strlen(b),t=1,t1=1;
	ull ah=0,bh=0,al=0,bl=0;
	if (x>y)
		return 0;
	for (i=0;i

你可能感兴趣的:(POJ3461 字符串hash)