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:同问!有谁能给解释一下此题的排序二分算法么? thanks!!!In Reply To:同问!有谁能给解释一下此题的排序二分算法么? thanks!!! Posted by:orangeman at 2009-09-06 05:54:54 > 怎么排序, 怎么二分? 估计所谓的排序,二分……就是判断v的祖先在不在u的祖先列表L中。。暴力查找导致复杂度是O(n^2). 二分可以不超时。。 但其实直接一个flag[.]就可以了,hash思想……O(n) -.- Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator