Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

java EK算法简单ac,说说关键

Posted by gjlsx at 2009-05-03 13:14:37 on Problem 1459
用java搞定了啊,简单ac,关键是这个:
 一般网络的最大流
    描述:给定一个含多个源和多个汇的网络,找出其中的最大流。
    解法:在原网络的基础上,增加一个虚源s和一个虚汇t。若原网络有p个源s1, s2, …, sp和q个汇t1, t2, …, tq,则在原网络中增加p条以s为起点的边(s,s1), (s,s2), …, (s,sp),以及q条以t为终点的边(t1,t), (t2,t), …, (tq,t),新增各边的容量分别定义为各源si的流出量和各汇t的流入量。新网络的s-t最大流与原网络的最大流等价。

Followed by:

Post your reply here:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator