标签:col int pre div array += bsp tor amp
1 class NumArray 2 { 3 vector<int> num; 4 public: 5 NumArray(vector<int>& nums) 6 { 7 num = nums; 8 } 9 10 void update(int i, int val) 11 { 12 num[i] = val; 13 } 14 15 int sumRange(int i, int j) 16 { 17 int sum = 0; 18 for(int k = i;k <= j;k ++) sum += num[k]; 19 return sum; 20 } 21 };
标签:col int pre div array += bsp tor amp
原文地址:https://www.cnblogs.com/yuhong1103/p/12716788.html