Skip to content

Commit 630a5bd

Browse files
committed
run with sanitizer
1 parent 609d5a3 commit 630a5bd

136 files changed

Lines changed: 294 additions & 284 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test_all.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
os: [ubuntu-latest, ubuntu-22.04]
99
name: Test all (${{ matrix.os }})
1010
runs-on: ${{ matrix.os }}
11-
timeout-minutes: 20
11+
timeout-minutes: 50
1212
steps:
1313
- uses: actions/checkout@v4
1414
- run: ./test/test.sh

.github/workflows/test_datastructures.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
os: [ubuntu-latest, ubuntu-22.04]
1717
name: Test datastructures (${{ matrix.os }})
1818
runs-on: ${{ matrix.os }}
19-
timeout-minutes: 10
19+
timeout-minutes: 20
2020
steps:
2121
- uses: actions/checkout@v4
2222
- run: ./test/test.sh datastructures

.github/workflows/test_geometry.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
os: [ubuntu-latest, ubuntu-22.04]
1717
name: Test geometry (${{ matrix.os }})
1818
runs-on: ${{ matrix.os }}
19-
timeout-minutes: 10
19+
timeout-minutes: 20
2020
steps:
2121
- uses: actions/checkout@v4
2222
- run: ./test/test.sh geometry

.github/workflows/test_graph.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
os: [ubuntu-latest, ubuntu-22.04]
1717
name: Test graph (${{ matrix.os }})
1818
runs-on: ${{ matrix.os }}
19-
timeout-minutes: 10
19+
timeout-minutes: 30
2020
steps:
2121
- uses: actions/checkout@v4
2222
- run: ./test/test.sh graph

.github/workflows/test_math.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
os: [ubuntu-latest, ubuntu-22.04]
1717
name: Test math (${{ matrix.os }})
1818
runs-on: ${{ matrix.os }}
19-
timeout-minutes: 10
19+
timeout-minutes: 30
2020
steps:
2121
- uses: actions/checkout@v4
2222
- run: ./test/test.sh math

content/graph/bitonicTSP.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
vector<vector<double>> dist; // Initialisiere mit Entfernungen zwischen Punkten.
22

3-
auto bitonicTSP() {
3+
auto bitonicTSP() { // n >= 2!
44
vector<double> dp(sz(dist), HUGE_VAL);
55
vector<int> pre(sz(dist)); // nur für Tour
66
dp[0] = 0; dp[1] = 2 * dist[0][1]; pre[1] = 0;

content/graph/matching.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
constexpr int MOD=1'000'000'007, I=10;
1+
constexpr int mod=1'000'000'007, I=10;
22
vector<vector<ll>> adj, mat;
33

44
int max_matching() {
@@ -9,10 +9,10 @@ int max_matching() {
99
mat[v].assign(sz(adj), 0);
1010
for (int u : adj[v]) {
1111
if (u < v) {
12-
mat[v][u] = rand() % (MOD - 1) + 1;
13-
mat[u][v] = MOD - mat[v][u];
12+
mat[v][u] = rand() % (mod - 1) + 1;
13+
mat[u][v] = mod - mat[v][u];
1414
}}}
15-
gauss(sz(adj), MOD); //LGS @\sourceref{math/lgsFp.cpp}@
15+
gauss(sz(mat), sz(mat[0])); //LGS @\sourceref{math/lgsFp.cpp}@
1616
int rank = 0;
1717
for (auto& row : mat) {
1818
if (*max_element(all(row)) != 0) rank++;

content/math/gcd-lcm.cpp

Lines changed: 0 additions & 2 deletions
This file was deleted.

content/math/piLehmer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ll memoC[N];
66

77
void init() {
88
primeSieve(); // @\sourceref{math/primeSieve.cpp}@
9-
for (ll i = 0; i < N; i++) {
9+
for (ll i = 1; i < N; i++) {
1010
memoC[i] = memoC[i - 1];
1111
if (isPrime(i)) memoC[i]++;
1212
}

test/datastructures/LCT.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,5 +194,5 @@ void performance_test() {
194194

195195
int main() {
196196
stress_test();
197-
performance_test();
197+
if (!sanitize) performance_test();
198198
}

0 commit comments

Comments
 (0)