```
class NumArray(object):
def __init__(self, nums):
"""
initialize your data structure here.
:type nums: List[int]
"""
self.dc = {-1:0}
for i,v in enumerate(nums):
self.dc[i] = self.dc[i-1] + v
def sumRange(self, i, j):
"""
sum of elements nums[i..j], inclusive.
:type i: int
:type j: int
:rtype: int
"""
return self.dc[j]-self.dc[i-1]
```