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 |
算法第一步:找树的直径,可以证明每个点的最远点均为直径两个端点之一,O(n);算法第二步,二分长度加单调队列,O(nlogn),我很笨,无法说服自己使用O(n)的方法,效率有点低RT Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator