diff options
| author | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 01:24:14 +0100 |
|---|---|---|
| committer | Gloria Mundi <gloria@gloria-mundi.eu> | 2024-11-16 01:24:14 +0100 |
| commit | 98567ec798aa8ca2cfbcb85c774dd470f30e30d4 (patch) | |
| tree | 5113d5cc24d1ad5f93810b6442ce584a36950dc8 /graph/matching.cpp | |
| parent | ad3856a6b766087df0036de0b556f4700a6498c9 (diff) | |
| parent | 8d11c6c8213f46f0fa19826917c255edd5d43cb1 (diff) | |
mzuenni tests
Diffstat (limited to 'graph/matching.cpp')
| -rw-r--r-- | graph/matching.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/graph/matching.cpp b/graph/matching.cpp deleted file mode 100644 index 2513604..0000000 --- a/graph/matching.cpp +++ /dev/null @@ -1,23 +0,0 @@ -constexpr int MOD=1'000'000'007, I=10; -vector<vector<ll>> adj, mat; - -int max_matching() { - int ans = 0; - mat.assign(sz(adj), {}); - for (int _ = 0; _ < I; _++) { - for (int v = 0; v < sz(adj); v++) { - 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]; - }}} - gauss(sz(adj), MOD); //LGS @\sourceref{math/lgsFp.cpp}@ - int rank = 0; - for (auto& row : mat) { - if (*min_element(all(row)) != 0) rank++; - } - ans = max(ans, rank / 2); - } - return ans; -} |
