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 |
费用流感觉也行除了增加原来的边外,然后再在每条边(x, y, 0, w)的基础上添加一条(x, y, 1, INFI),这样SPFA到距离d[SINK] == 1 时看有几次是增广距离为1的,那么就输出几。 但是其中有可能重复的,所以还要判重。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator