From d3f6e1fb3f3fdaf28ddce424d47cf91ceccec8cc Mon Sep 17 00:00:00 2001 From: Ariel Date: Sun, 18 Feb 2024 14:54:50 +0800 Subject: [PATCH] Update hash_deque.cc --- string/hash_deque.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/string/hash_deque.cc b/string/hash_deque.cc index 151ba5b..f26a6b3 100644 --- a/string/hash_deque.cc +++ b/string/hash_deque.cc @@ -1,12 +1,10 @@ static vector power1, power2; +static const ll b = rd(); +static const ll INV1 = inverse(b, MDL1); +static const ll INV2 = inverse(b, MDL2); template > struct hash_deque { using hash_type = pll; - static constexpr ll b = 31; - static constexpr ll MDL1 = 8784491; - static constexpr ll MDL2 = 998244353; - static constexpr ll INV1 = 7934379; - static constexpr ll INV2 = 128805723; ll hash1, hash2; _Sequence seq; size_t size() {