摘要:
在完备匹配的基础上实现边权最大(KM算法) 如果不是完备匹配可以用费用流 blog 洛谷 AC #include <algorithm> #include <cstring> #include <cstdio> #include <iostream> using namespace std; con 阅读全文
摘要:
洛谷 #include<bits/stdc++.h> using namespace std; const int N = 50005, M = 50000 * 2 + 5; int h[N], e[M], ne[M], flow[M], cost[M], idx; int n, m, S, T; 阅读全文
摘要:
匈牙利算法 AC #include <iostream> #include <cstring> #include <algorithm> using namespace std; const int N = 510, M = 100010; int h[N], e[M], ne[M], idx; i 阅读全文