Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Prim改了下过了,把每个顶点到自己的路径初始化为-1,cost[i][i] = -1 ,已经修好的路径初始化为0,直接求最小生成树权和结果就是答案,不过prim在判断路径时记得要按初始化的-1判断Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator