1.可用树状数组:https://www.acwing.com/problem/content/797/ 2.可用差分:https://www.acwing.com/problem/content/799/ 3.可用线段树: