diff options
Diffstat (limited to 'string/rollingHash.cpp')
| -rw-r--r-- | string/rollingHash.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/string/rollingHash.cpp b/string/rollingHash.cpp index cd88951..00e2273 100644 --- a/string/rollingHash.cpp +++ b/string/rollingHash.cpp @@ -1,6 +1,6 @@ -// q = 29, 101, 257, 65537, 100003, 1000033 (or random) -// m = 1500000001, 1600000009, 1700000009 -// always compare hash and length of hashed range! +// q = 29, 53, 101, 257, 1009, 65'537 +// or choose q random from [sigma, m) +// m = 1'500'000'001, 1'600'000'009, 1'700'000'009 template<ll M, ll Q> struct Hasher { vector<ll> power = {1}, pref = {0}; |
