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 |
并查集,O(n^2logn)思路: i.两层循环把所两两边插入最小堆 ii.每次从堆顶取出最小的边,合并两个定点,检查0点和1点是否被合并。若被合并,算法结束,否则继续。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator