Question: I have an array a[0..n – 1]. I have 2 types operations: sum l r: sum = a[l] * 1 + a[l+1] * 2 + … + a[r] * (r – l) update index value: a[index] = value How ...
Question: I have an array a[0..n – 1]. I have 2 types operations: sum l r: sum = a[l] * 1 + a[l+1] * 2 + … + a[r] * (r – l) update index value: a[index] = value How ...