From 630a5bdf06d59b8340fb4bfc0e692cbcf094026a Mon Sep 17 00:00:00 2001 From: mzuenni Date: Thu, 10 Jul 2025 17:40:18 +0200 Subject: run with sanitizer --- content/graph/matching.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'content/graph/matching.cpp') 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> 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++; -- cgit v1.2.3