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:搜索过的保存 避免重复 就不会超时了In Reply To:Re:搜索过的保存 避免重复 就不会超时了 Posted by:lych at 2005-11-03 20:00:02 具体来说,当你求一个点A的最远点B的时候,你同时也求出了从A到B这条路上的所有点的最远点,将他们保存下来,避免重复搜索即可避免超时.该算法的复杂度大概为O(n^2). Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator