summaryrefslogtreecommitdiff
path: root/string
diff options
context:
space:
mode:
Diffstat (limited to 'string')
-rw-r--r--string/rollingHash.cpp6
-rw-r--r--string/rollingHashCf.cpp4
2 files changed, 5 insertions, 5 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};
diff --git a/string/rollingHashCf.cpp b/string/rollingHashCf.cpp
index 9608aff..b055b29 100644
--- a/string/rollingHashCf.cpp
+++ b/string/rollingHashCf.cpp
@@ -1,6 +1,6 @@
-// q = 29, 53, 101, 257, 1009, 65537
+// q = 29, 53, 101, 257, 1009, 65'537
// or choose q random from [sigma, m)
-// m = 1500000001, 1600000009, 1700000009
+// m = 1'500'000'001, 1'600'000'009, 1'700'000'009
struct Hasher {
vector<ll> power = {1}, pref = {0};
ll m, q; char c;