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 |
请问有什么好方法吗?In Reply To:恩..没有必要要求出所有的点队 Posted by:uni at 2005-10-04 21:08:16 也是全源最短路径…… 不过耍了点小聪明,题目说一个点最多有20条边,我把Floyd变成Dijkstra,之后邻接表+优先队列实现,每个点算一次,复杂度差不多是O(n^2 * logn),就变成200+ms 了。。。 Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator