2023年2月20日
摘要: 1 int n; 2 int a[1005],c[1005]; //对应原数组和树状数组 3 4 int lowbit(int x){ 5 return x&(-x); 6 } 7 8 void updata(int i,int k){ //在i位置加上k 9 while(i <= n){ 10 c 阅读全文
posted @ 2023-02-20 20:58 么么打123 阅读(13) 评论(0) 推荐(0) 编辑
摘要: 1 struct node 2 { 3 int l,r,sum,lazy; 4 node *lson,*rson; 5 node() 6 { 7 l = r = sum = lazy = 0; 8 lson = rson = NULL; 9 } 10 }; 11 12 node* build(vec 阅读全文
posted @ 2023-02-20 15:06 么么打123 阅读(16) 评论(0) 推荐(0) 编辑