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:提醒使用相鄰矩陣的同學...

Posted by xihushuzi at 2012-07-10 20:09:16 on Problem 3259
In Reply To:提醒使用相鄰矩陣的同學... Posted by:soultama at 2011-06-16 04:49:22
> 吃輸入資料的時候只要留下權重最小的邊,因為測試數據會有parallel edges陷阱...
> 
> 另外是測試數據都會連通Node 1,所以可以放心在第1個點用Single source Bellman-Ford。
> 
> 附上我測試用的數據,希望會幫到忙
> 
> 3
> 5 3 1
> 2 3 1
> 2 5 1
> 3 4 1
> 4 5 10
> 4 3 1
> 1 2 1
> 2 3 1
> 3 4 1
> 4 2 2
> 2 1 1
> 1 2 10
> 1 2 11
> 1)這讓人很無言, 實際上應該是YES(2->3->4->5->2), 不過我輸出NO的程序就是AC了
> 2)NO (2->3->4->2的值是0, 回不了過去)
> 3)YES

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