随笔分类 - 模板
摘要:1、无源汇可行流 对每条边(from,to,cap)改造 cap=upper-lower inflow[to]+=lower outflow[from]+=lower 然后对每个点Addedge(s,i,inflow[i]),Addedge(i,t,ouflow[i]) 2、 有源汇可行流 Adde
阅读全文
摘要:#include #include #include #include using namespace std; const int maxn=500009; const int oo=2147483647; int T; int nn=0; int ch[maxn*50][2]={0},siz[maxn*50]={0},pri[maxn*50]={0},ky[maxn*50]={0}; in...
阅读全文

浙公网安备 33010602011771号