Lang:G++
Edit12345678910111213141516171819202122232425262728293031#include <bits/stdc++.h>using namespace std;const int N = 103;int match[N][N], matchIdx;const int MAXN = 10011;const int MAXM = 100011;const int INF = (1 << 30);struct Edge {int next, from, to, cap, cost;};struct MCMF {Edge edge[MAXM];int head[MAXN], countedge;void Init(int N) {this->N = N;memset(head, -1, sizeof(head));countedge = 0;}int N;int inq[MAXN], dis[MAXN], pre[MAXN], ad[MAXN];void AddEdge(const int& start, const int& end, const int& cap,const int& cost) {edge[countedge].to = end;edge[countedge].from = start;