Dynamic Segment Trees

Revision en2, by noobinho, 2018-07-19 00:49:08

I'm trying to solve the problem: http://acm.timus.ru/problem.aspx?space=1&num=1439 I tryed to code a dynamic segment tree to solve in O(m*logn²) of time, as follows:https://ideone.com/e.js/jLFIMv. However, it gave MLE. So, I want to know what I can do to improve the memory used. Thanks in advance

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English noobinho 2018-07-20 19:50:40 1 UP1: Correction of the complexity
en3 English noobinho 2018-07-19 01:53:06 346
en2 English noobinho 2018-07-19 00:49:08 13
en1 English noobinho 2018-07-19 00:19:39 321 Initial revision (published)