WA8 Rabin–Karp and AC with KMP

any idea what could be my mistake? i'm using

i=n; i< 2n; i++

h2=((mod + h2 - dn * a[i-n] % mod) * d % mod + a[i]) % mod;

where d=256, dn=d^(n-1) mod=10^9+9

Re: WA8 Rabin–Karp and AC with KMP

i had WA8 with hashes, i had maxn = 250100, but it must be doubled for algo and it passed with 500100