Cannot figure out the reason of TLE...

Revision en1, by always_4ever_5_25__21_SS, 2018-04-09 18:56:50

37125846

I am trying to solve Sereja and Brackets . I can see that n is up to 10^6. And I have seen others solutions and they are pretty much as same as mine. I cannot figure out why I am getting TLE for my submission. Cannot find anything wrong with my segment tree or if I have missed something. :(

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English always_4ever_5_25__21_SS 2018-04-09 18:57:39 73
en1 English always_4ever_5_25__21_SS 2018-04-09 18:56:50 402 Initial revision (published)