https://www.jianshu.com/p/91f2c503e62f
It could reduce the tree size very much
leetcode 699. Falling Squares
练习了两道题,感觉基本掌握了segment tree 308. Range Sum Query 2D - Mutable 307. Range Sum Query - Mutable
但是感觉segment写起来很笨重,一大堆的操作和helper函数,看到很多BIT的写法更加的精简,值得仔细研究一下