library

This documentation is automatically generated by online-judge-tools/verification-helper

View the Project on GitHub kk2a/library

:heavy_check_mark: verify/yosupo_graph/graph_matching_bipartite.test.cpp

Depends on

Code

#define PROBLEM "https://judge.yosupo.jp/problem/bipartitematching" 

#include "../../graph/graph.hpp"
#include "../../graph/maxflow.hpp"
#include "../../template/template.hpp"
using namespace std;

int main() {
    int l, r, m;
    kin >> l >> r >> m;
    kk2::DWAdjList<int> g(l + r + 2);
    rep (m) {
        int a, b;
        kin >> a >> b;
        g.add_edge(a, l + b, 1);
    }
    rep (i, l) g.add_edge(l + r, i, 1);
    rep (i, r) g.add_edge(l + i, l + r + 1, 1);

    kk2::MaxFlow<kk2::DWAdjList<int>> mf(g);

    int count = mf.flow(l + r, l + r + 1);
    kout << count << "\n";

    auto tmp = mf.get_edges();
    for (auto &&e : tmp) {
        if (count == 0) break;
        if (e.flow == 0) continue;
        kout << e.from << " " << e.to - l << "\n";
        count--;
    }

    return 0;
}
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/documentation/build.py", line 71, in _render_source_code_stat
    bundled_code = language.bundle(stat.path, basedir=basedir, options={'include_paths': [basedir]}).decode()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus.py", line 187, in bundle
    bundler.update(path)
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 401, in update
    self.update(self._resolve(pathlib.Path(included), included_from=path))
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 401, in update
    self.update(self._resolve(pathlib.Path(included), included_from=path))
  File "/opt/hostedtoolcache/Python/3.12.0/x64/lib/python3.12/site-packages/onlinejudge_verify/languages/cplusplus_bundle.py", line 312, in update
    raise BundleErrorAt(path, i + 1, "#pragma once found in a non-first line")
onlinejudge_verify.languages.cplusplus_bundle.BundleErrorAt: type_traits/io.hpp: line 4: #pragma once found in a non-first line
Back to top page