2756 思路: 二分讨论,网络流检验: 代码: #include <bits/stdc++.h> using namespace std; #define INF 1e16 #define maxn 40005 #define ll long long ]={,-,,,}; ]={,,,,-}; ll ai[][],id[][],suma,sumb,cnta,cntb,que[maxn],Max,ans; ll deep[maxn],E[maxn],V[maxn],F[maxn],cnt,h…