Some help with time limit.

Правка en1, от fabianun, 2017-02-10 02:42:30

Hello everyone,

I am doing some segment tree problems and I get stuck in this

http://www.spoj.com/problems/RPLN/

I just use a recursive implementation of segment tree and always get time limit. This is my code

https://ideone.com/PRIfI5

So, can someone help me to improve the speed of my code (the segment tree) but keep doing with recursion (do not go with iterative implementation please.)

Thank you in advance.

Теги segment tree, time limit exceeded, spoj

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский fabianun 2017-02-10 02:42:30 456 Initial revision (published)