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:kruskal确实比prim慢In Reply To:kruskal确实比prim慢 Posted by:Zenomyth at 2013-10-29 10:59:26 > 我的经过优化的kruskal用了422ms,而没有任何优化的prim只用360ms。 > 理论上kruskal的复杂度为ElogE,而prim为(E+V)logV,prim对于稠密图确实快一些 Kruscal 最耗时的部分是对所有边进行排序,时间复杂度为ElogE,在稠密图边很多的情况下自然更耗时了. Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator