summaryrefslogtreecommitdiff
path: root/content/graph/matching.cpp
diff options
context:
space:
mode:
authormzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
committermzuenni <michi.zuendorf@gmail.com>2025-07-10 17:40:18 +0200
commit630a5bdf06d59b8340fb4bfc0e692cbcf094026a (patch)
treeadee732c8d2cdcb46e5f400611c370b4c2ec1947 /content/graph/matching.cpp
parent609d5a3bf490cfa151b40e60cb62c8ff751bbe56 (diff)
run with sanitizer
Diffstat (limited to 'content/graph/matching.cpp')
-rw-r--r--content/graph/matching.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/graph/matching.cpp b/content/graph/matching.cpp
index dcaea8c..1e450c0 100644
--- a/content/graph/matching.cpp
+++ b/content/graph/matching.cpp
@@ -1,4 +1,4 @@
-constexpr int MOD=1'000'000'007, I=10;
+constexpr int mod=1'000'000'007, I=10;
vector<vector<ll>> adj, mat;
int max_matching() {
@@ -9,10 +9,10 @@ int max_matching() {
mat[v].assign(sz(adj), 0);
for (int u : adj[v]) {
if (u < v) {
- mat[v][u] = rand() % (MOD - 1) + 1;
- mat[u][v] = MOD - mat[v][u];
+ mat[v][u] = rand() % (mod - 1) + 1;
+ mat[u][v] = mod - mat[v][u];
}}}
- gauss(sz(adj), MOD); //LGS @\sourceref{math/lgsFp.cpp}@
+ gauss(sz(mat), sz(mat[0])); //LGS @\sourceref{math/lgsFp.cpp}@
int rank = 0;
for (auto& row : mat) {
if (*max_element(all(row)) != 0) rank++;