您当前的位置: 首页 > 

minato_yukina

暂无认证

  • 3浏览

    0关注

    138博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

最小费用流模板

minato_yukina 发布时间:2020-12-09 15:34:12 ,浏览量:3

最小费用流:

把EK算法里面的BFS换成SPFA就完事了.背背背

int maxx=0;
struct Edge{
	int from,to,cap,flow,cost;
};
struct MCMF{
	int n,m,s,t;    
	vector edges;vector G[maxn];
	int inq[maxn],d[maxn],p[maxn],a[maxn];
	void init(int n){
		this->n=n;
		for(int i=0;i            
关注
打赏
1663570241
查看更多评论
0.0506s