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 |
Re:但sample明显有环牙In Reply To:但sample明显有环牙 Posted by:Pzjay at 2009-10-25 19:18:47 这个题目的答案可以有环,也可以无环(只要满足最长边最短)。只不过无环的话简单的多了,用Kruscal就好了(因为用Kruscal求最小生成树的时候恰好具有最大边最短的性质,但prim只能求最小生成树,不能保证这个性质) Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator