对于(u,v), 建立(u,v'),(v', u)容量都是1 (S,u)容量是d[u] (u',T)容量是d[u] 跑网络流。过了。 #include <bits/stdc++.h> #define INF 0x7fffffff using namespace std; const int maxn = 105; const int maxm = 205; struct Edge { int from, to, cap, flow, next; Edge(int x=0, int y=0, int c=0, int nex=0) : fro...