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

Re:如果图不连通,怎么用BellmanFord找负环?

Posted by autumncat at 2010-02-18 17:00:36 on Problem 2240
In Reply To:如果图不连通,怎么用BellmanFord找负环? Posted by:ZaakDov at 2009-11-12 11:06:54
> 如果对于每个点都来一次Bellman-Ford找负环,那就退化了……
> 但不连通的时候,我不知道不对每个点都来一次又该怎么办,请指教!

添加一个点,把所有原来的点都跟他连一条长度大于所有负边之和的相反数的边

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