spoj : HORRIBLE segment tree to add or to get sum of any given range