summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graph/matching.cpp2
-rw-r--r--java/java.tex4
-rw-r--r--latexHeaders/code.sty4
-rw-r--r--math/berlekampMassey.cpp2
-rw-r--r--math/bigint.cpp2
-rw-r--r--math/binomial2.cpp2
-rw-r--r--math/linearRecurence.cpp2
-rw-r--r--math/linearSieve.cpp2
-rw-r--r--math/primeSieve.cpp2
-rw-r--r--math/squfof.cpp2
-rw-r--r--other/compiletime.cpp2
-rw-r--r--other/stuff.cpp4
-rw-r--r--string/rollingHash.cpp6
-rw-r--r--string/rollingHashCf.cpp4
-rw-r--r--tcr.pdfbin646076 -> 645946 bytes
15 files changed, 21 insertions, 19 deletions
diff --git a/graph/matching.cpp b/graph/matching.cpp
index ed9ba62..ddd1c81 100644
--- a/graph/matching.cpp
+++ b/graph/matching.cpp
@@ -1,4 +1,4 @@
-constexpr int MOD=1000000007, I=10;
+constexpr int MOD=1'000'000'007, I=10;
vector<vector<ll>> adjlist, mat;
int gauss(int n, ll p) {
diff --git a/java/java.tex b/java/java.tex
index af8a024..822de74 100644
--- a/java/java.tex
+++ b/java/java.tex
@@ -1,3 +1,4 @@
+\begingroup
\section{Java}
\lstset{language=Java}
@@ -33,5 +34,4 @@
\subsection{BigInteger}
\lstinputlisting{java/bigInteger.java}
}
-
-\lstset{language=C++}
+\endgroup
diff --git a/latexHeaders/code.sty b/latexHeaders/code.sty
index 535a380..67a6f15 100644
--- a/latexHeaders/code.sty
+++ b/latexHeaders/code.sty
@@ -22,7 +22,7 @@
\usepackage{listings}
\lstset{
- language={C++},
+ language={[11]C++},
numbers=left,
stepnumber=1,
numbersep=6pt,
@@ -44,6 +44,7 @@
frame=trbl,
aboveskip=3pt,
belowskip=3pt,
+ deletestring=[b]{'},%lose char heighlighting but win digit separator
escapechar=@
%moredelim=**[is][{\btHL[fill=green!30,draw=red,dashed,thin]}]{@}{@}
}
@@ -106,3 +107,4 @@
\makeatother
\newcommand{\hl}[1]{\btHL[fill=safeOrange,draw=black,thin]{#1}}
+
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<ll> BerlekampMassey(const vector<ll>& s) {
int n = sz(s), L = 0, m = 0;
vector<ll> 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<ll> modMul(const vector<ll>& a, const vector<ll>& b,
const vector<ll>& 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<ll> 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<N / 2> isNotPrime;
vector<ll> 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<lll, int>& facts) {
for (lll i = 2; i * i <= n && i <= trialLim; i++) {
diff --git a/other/compiletime.cpp b/other/compiletime.cpp
index 19824e6..b71f83b 100644
--- a/other/compiletime.cpp
+++ b/other/compiletime.cpp
@@ -4,4 +4,4 @@ struct Table {
constexpr Table() : data {} {
for (int i = 0; i < N; i++) data[i] = i;
}};
-constexpr Table<100000> precalculated;
+constexpr Table<100'000> precalculated;
diff --git a/other/stuff.cpp b/other/stuff.cpp
index e3bbed6..36e60ab 100644
--- a/other/stuff.cpp
+++ b/other/stuff.cpp
@@ -24,6 +24,6 @@ __int128, __float128
std::decimal::decimal128
// 1e18 < INF < Max_Value / 2
-constexpr long long INF = 0x3FFF_FFFF_FFFF_FFFFll;
+constexpr long long INF = 0x3FFF'FFFF'FFFF'FFFFll;
// 1e9 < INF < Max_Value / 2
-constexpr int INF = 0x3FFF_FFFF;
+constexpr int INF = 0x3FFF'FFFF;
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;
diff --git a/tcr.pdf b/tcr.pdf
index 2a4966e..e6b20a7 100644
--- a/tcr.pdf
+++ b/tcr.pdf
Binary files differ