p.s-i saw the editorial provided SEACO - Editorial - editorial - CodeChef Discuss
Well, i have made use of difference array and sum array without using trees.
You can read about applying range updates in array in constant O(1) time using sum array Here
You may have a look at my approach explanation Here and My code Here
Feel free to ask anything…
Please upvote if u find this helpful…
i have explained it step by step. read it , i hope it helps.