yeah leppy, i am trying to solve Multiple of 3 problem on SPOJ. spoj.pl/problems/MULTQ3/6
what i could not understand is how do i implement the very basic query/update function on segment tree. consider the segment tree of [0,9] on topcoder. if i am to increase the value of elements in range [0,5] by 1, how do i search for this range in tree. moreover each element is present on more than one tree node (for example element 9 is present on the last node at each level), so which tree node out of all those nodes should i increase for that element.
same problem i will face in retrieving value of any range.