| ||||||||||
Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:请教网络流的做法In Reply To:请教网络流的做法 Posted by:Alcyone at 2003-06-06 01:59:52 网络流问题(可能还有更好的方法) 假设访问第I个猪圈顾客依次为Pi1,Pi2,Pi3,……Pi(J)…… 1.先让N个顾客对应N个节点, 则在Pi(J-1)和Pi(J)之间连接容量为MAXF(无穷大)的边;(1<=i<=m) 2.源点S到Pi1连接边, 容量为第I个猪圈中猪的数目,并合并重边(容量相加);(1<=i<=m) 3.N个节点到汇点T连接边,容量为每个顾客愿意购买的猪的数量。 求最大流,到达汇点T的流量和即为最优解。 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator