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:用线段树查询的时候不是也是O(n)的复杂度吗?为什么不会超时呢??In Reply To:用线段树查询的时候不是也是O(n)的复杂度吗?为什么不会超时呢?? Posted by:jieyj at 2010-05-17 14:59:22 最坏的情况是最后颜色被涂成1,2,3,1,2,3……1,2,3且每次查询的时候都让你查询1到n,那查询次数岂不是都到查询到叶子节点? Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator