线段树模板https://www.acwing.com/video/664/
数据存储:int w[N];//记录一下权重
struct node{
int l,r;//左右区间
int sum;//总和
}tr[N*4
2021-11-12