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

这题感觉bellman 比spfa好

Posted by gyarenas at 2011-11-23 19:33:40 on Problem 3259
因为这题没有确定的起点,也没有给出所有点都是连通的,用spfa的话应该要枚举所有点,bellman的话直接把所有点dist设为相同的值,对所有的边进行n次relax即可

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