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:也对,像这题的图多半是稀疏的图了。。。直接BFS找最短路,找邻接点时现算就可。。O(L+n)。所以先用O(n2)预处理反而不合算In Reply To:也对,像这题的图多半是稀疏的图了。。。直接BFS找最短路,找邻接点时现算就可。。O(L+n)。所以先用O(n2)预处理反而不合算 Posted by:hanjialong at 2008-08-27 18:16:05 我先计算临界阵就TLE,改了以后反而才500多ms Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator