PROBLEM LINKSDIFFICULTYMEDIUM EXPLANATIONThe problem can be solved using segment trees. Every node of the tree stores the following data : 1) tree0[k] : In the range [low..high] covered by this node, how many numbers are divisible by 3 considering just additions performed on numbers totally inside this range and not considering additions performed on ranges which are a subrange of the range covered at node k/2
This question is marked "community wiki".
asked 29 Nov '12, 12:15

Can we solve it using BIT? If yes then How?? answered 14 Mar '13, 19:28

plz elaborate your explaination....its too difficult too understand from such 3 confusing statements u have mentioned just for the sake of editorial..  _  answered 31 May '16, 01:21

Can anyone help me, pls ?? I use Segment Tree but I got Wrong Answer and I don't know why. This is my submission, help me, please. https://www.codechef.com/viewsolution/13414560 answered 01 May, 08:41

Hey..I have solved this question using segtrees but Im getting WRONG ANSWER. Here is my code. https://www.codechef.com/viewsolution/15771326 Thanks in advance. answered 11 Oct, 19:39

include<cstdio>using namespace std; int main() { int n,q; scanf("%d %d", &n, &q);
} WHY is this giving TLE error??? answered 19 Oct '14, 14:56
