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:我用spfa最短路一直超时,有大牛用此方法过的给点指点,谢谢!~In Reply To:我用spfa最短路一直超时,有大牛用此方法过的给点指点,谢谢!~ Posted by:boys at 2007-07-08 20:03:00 最坏的情况下,n次spfa,也就是说O(n^2),绝对超时。例如:10000个点(入度为0)都指向一条长度为90000的链的首端,spfa做,需要9*10^8次。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator