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

用Dijkstra的变形做的。。

Posted by Sasuke_SCUT at 2009-05-06 15:37:18 on Problem 1797
更新点值的式子是d[v]=max(d[v],min(d[u],map[u][v]));
下一次寻找更新的点是d值最大的点.
顺便贴一点数据
4
3 3
1 2 3
1 3 4
2 3 5

4 4
1 2 2
1 3 1
2 4 3
3 4 4

4 3
2 4 2
1 4 1
3 4 4

4 5
1 2 3
1 3 4
2 3 2
2 4 3
3 4 4

key:
Scenario #1:
4

Scenario #2:
2

Scenario #3:
1

Scenario #4:
4

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