From 24f0c12468a2d66dcae1a3204d949b195daffb38 Mon Sep 17 00:00:00 2001 From: MZuenni Date: Wed, 1 Mar 2023 12:50:38 +0100 Subject: added digit separator --- math/berlekampMassey.cpp | 2 +- math/bigint.cpp | 2 +- math/binomial2.cpp | 2 +- math/linearRecurence.cpp | 2 +- math/linearSieve.cpp | 2 +- math/primeSieve.cpp | 2 +- math/squfof.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'math') diff --git a/math/berlekampMassey.cpp b/math/berlekampMassey.cpp index 734c07e..29e084f 100644 --- a/math/berlekampMassey.cpp +++ b/math/berlekampMassey.cpp @@ -1,4 +1,4 @@ -constexpr ll mod = 1000000007; +constexpr ll mod = 1'000'000'007; vector BerlekampMassey(const vector& s) { int n = sz(s), L = 0, m = 0; vector C(n), B(n), T; diff --git a/math/bigint.cpp b/math/bigint.cpp index df28a73..6f83a93 100644 --- a/math/bigint.cpp +++ b/math/bigint.cpp @@ -1,5 +1,5 @@ // base and base_digits must be consistent -constexpr ll base = 1000000; +constexpr ll base = 1'000'000; constexpr ll base_digits = 6; struct bigint { vll a; ll sign; diff --git a/math/binomial2.cpp b/math/binomial2.cpp index 2ddcfe9..4531505 100644 --- a/math/binomial2.cpp +++ b/math/binomial2.cpp @@ -1,4 +1,4 @@ -constexpr ll mod = 1000000009; +constexpr ll mod = 1'000'000'009; ll binomPPow(ll n, ll k, ll p) { ll res = 1; diff --git a/math/linearRecurence.cpp b/math/linearRecurence.cpp index 3e1f812..2501e64 100644 --- a/math/linearRecurence.cpp +++ b/math/linearRecurence.cpp @@ -1,4 +1,4 @@ -constexpr ll mod = 1000000007; +constexpr ll mod = 1'000'000'007; vector modMul(const vector& a, const vector& b, const vector& c) { ll n = sz(c); diff --git a/math/linearSieve.cpp b/math/linearSieve.cpp index e1fa7ff..b029b9a 100644 --- a/math/linearSieve.cpp +++ b/math/linearSieve.cpp @@ -1,4 +1,4 @@ -constexpr ll N = 10000000; +constexpr ll N = 10'000'000; ll smallest[N], power[N], sieved[N]; vector primes; diff --git a/math/primeSieve.cpp b/math/primeSieve.cpp index 3898ab7..1b0f514 100644 --- a/math/primeSieve.cpp +++ b/math/primeSieve.cpp @@ -1,4 +1,4 @@ -constexpr ll N = 100000000; +constexpr ll N = 100'000'000; bitset isNotPrime; vector primes = {2}; diff --git a/math/squfof.cpp b/math/squfof.cpp index 78bca73..1cb97de 100644 --- a/math/squfof.cpp +++ b/math/squfof.cpp @@ -64,7 +64,7 @@ lll squfof(lll N) { exit(1);//try fallback to pollard rho } -constexpr lll trialLim = 5000; +constexpr lll trialLim = 5'000; void factor(lll n, map& facts) { for (lll i = 2; i * i <= n && i <= trialLim; i++) { -- cgit v1.2.3