双Hash模板结构体代码: const int N=1e6+10; const int mod1=3145739;//如有误差手动修改 const int mod2=6291469; struct Hash { ll has1[N],has2[N]; ll bas1[N],bas2[N]; ll p1,p2; void init(char s[])<