|  | 
|  | 
| back to board | AC in 0.249 and 8668 KB (RMQ for lca) Posted by sak3t  29 May 2017 15:39used RMQ using segment tree to find lca in log(n)total time complexity O(n+q*(lgn)) = O(q*lgn)
Re: AC in 0.249 and 8668 KB (RMQ for lca) Almost the same numbers (0.268, 11500) for table for 2^i -th ancestor. | 
 | 
|