Help for problem MSTICK

Help for problem [MSTICK][1]…
My code is running out of time after using segment tree.
Any help is greatly appreciated.
Here is the


[2], atleast have a look over this.. 


  [1]: https://www.codechef.com/problems/MSTICK
  [2]: https://www.codechef.com/viewsolution/13308793

variable names are confusing. the variable node in the function query will cease to exist when the function returns.

and why your code is giving TLE and not wrong answer?
my guess is that your segment tree is zero based and variable l can also store negative values

try this code
https://www.codechef.com/viewsolution/13341415

1 Like

naming convention is very difficult to understand…The code is to be more refined…Thank you

1 Like