Spoj Problem GOT

Правка en1, от vk_1510, 2016-01-23 16:48:24

Hi, I was trying to solve this problem GOT . My idea was to apply Heavy Light Decomposition on Tree with Segment Tree where each node of Segment Tree stores a std::set. Complexity of each query is O(LOGN * LOGN) which gives, TLE .

So, Any Hints on how to improve the solution.

Thanks

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский vk_1510 2016-01-23 16:50:21 12 Tiny change: '.spoj.com/status/GOT/) .\' -> '.spoj.com/problems/GOT/) .\'
en1 Английский vk_1510 2016-01-23 16:48:24 346 Initial revision (published)