# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
223446 | oolimry | Matching (COCI20_matching) | C++14 | 6 ms | 384 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 <bits/stdc++.h>
using namespace std;
struct Edge{
int u,v;
long long cap,flow;
Edge(){}
Edge(int u, int v, long long cap): u(u), v(v), cap(cap),flow(0){}
};
struct Dinic{
int N; ///number of nodes in the maxflow graph
vector<Edge> E;
vector<vector<int> > g;
vector<int> d,pt;
Dinic(int N): N(N),E(0),g(N),d(N),pt(N){}
///add edge going from "u" to "v" with capacity "cap"
void addEdge(int u, int v, long long cap){
if (u != v){
E.emplace_back(u,v,cap);
g[u].emplace_back(E.size()-1);
E.emplace_back(v,u,0);
g[v].emplace_back(E.size()-1);
}
}
///helper function don’t need to care
bool BFS(int S, int T){
queue<int> q({S});
fill(d.begin(),d.end(),N+1);
d[S] = 0;
while(!q.empty()){
Compilation message (stderr)
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |