# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
59737 | model_code | Min-max tree (BOI18_minmaxtree) | C++17 | 642 ms | 35996 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <algorithm>
#include <iostream>
#include <set>
#include <vector>
#define SZ(x) ((int) (x).size())
using namespace std;
const int INF = 0x3f3f3f3f;
class GeneralBipartiteMatcher {
public:
GeneralBipartiteMatcher(int n, int m):
adj(n), m(m) {}
void addEdge(int from, int to) {
adj[from].push_back(to);
}
vector<int> matching() const {
int n = SZ(adj);
vector<int> l(n, -1), r(m, -1);
vector<bool> used(n, false);
for (bool ok = true; ok; ) {
ok = false;
fill(used.begin(), used.end(), false);
for (int node = 0; node < n; ++node) {
if (l[node] == -1) {
ok |= pairUp(l, r, used, node);
}
}
}
return l;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |