Codeforces Round #304 (Div. 2)E. Soldier and Traveling 网络流
http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1442题意:n个城市,m条边, 每个点刚开始有ai个人,问最后能不能有bi个人,每个城市的人,要么不走,要么只能走到相邻的城市 输出能否达到并输出转移方案! 思路:最大流 s-a[i]-b[i]-t建图#include<iostream>#include<cstdio>
原创
2016-02-24 21:12:49 ·
407 阅读 ·
0 评论