From 631335a9c1dd0fba0e17977253d0a4b033aee59a Mon Sep 17 00:00:00 2001 From: mzuenni Date: Sat, 3 Feb 2024 14:33:16 +0100 Subject: fix indent --- other/stress.sh | 2 +- string/z.cpp | 16 ++++++++-------- tcr.pdf | Bin 666406 -> 667072 bytes 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/other/stress.sh b/other/stress.sh index 39424ce..d264c2a 100644 --- a/other/stress.sh +++ b/other/stress.sh @@ -2,6 +2,6 @@ for i in {1..1000}; do printf "\r$i" python3 gen.py > input # generate test with gen.py ./a.out < input > out # execute ./a.out - ./b.out < input > out2 # execute ./b.out + ./b.out < input > out2 # execute ./b.out diff out out2 || break done diff --git a/string/z.cpp b/string/z.cpp index c128e9d..069fa38 100644 --- a/string/z.cpp +++ b/string/z.cpp @@ -1,10 +1,10 @@ vector Z(const string& s) { - int n = sz(s); - vector z(n); - for (int i = 1, x = 0; i < n; i++) { - z[i] = max(0, min(z[i - x], x + z[x] - i)); - while (i + z[i] < n && s[z[i]] == s[i + z[i]]) { - x = i, z[i]++; - }} - return z; + int n = sz(s); + vector z(n); + for (int i = 1, x = 0; i < n; i++) { + z[i] = max(0, min(z[i - x], x + z[x] - i)); + while (i + z[i] < n && s[z[i]] == s[i + z[i]]) { + x = i, z[i]++; + }} + return z; } diff --git a/tcr.pdf b/tcr.pdf index cbb70b7..6404502 100644 Binary files a/tcr.pdf and b/tcr.pdf differ -- cgit v1.2.3