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

Prim改了下过了,把每个顶点到自己的路径初始化为-1,cost[i][i] = -1 ,已经修好的路径初始化为0,直接求最小生成树权和结果就是答案,不过prim在判断路径时记得要按初始化的-1判断

Posted by 19881005 at 2009-08-04 15:49:59 on Problem 2421


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