随笔分类 -  树状数组

摘要:http://acm.hdu.edu.cn/showproblem.php?pid=2689 #include<bits/stdc++.h> #define low(x) (x&(-x)) using namespace std; const int maxn=1e5+5; typedef long 阅读全文
posted @ 2020-05-28 11:47 Hazelxcf 阅读(161) 评论(0) 推荐(1)
摘要:https://ac.nowcoder.com/acm/problem/20861 #include<bits/stdc++.h> #define low(x) (x&(-x)) using namespace std; const int N=1e5+5; typedef long long ll 阅读全文
posted @ 2020-05-28 11:27 Hazelxcf 阅读(135) 评论(0) 推荐(0)
摘要:https://www.luogu.com.cn/problem/P1582 #include <bits/stdc++.h> using namespace std; #define int long long int n,k; //取出1的个数 int check(int x){ int c = 阅读全文
posted @ 2020-02-27 11:40 Hazelxcf 阅读(159) 评论(0) 推荐(0)
摘要:这一部分和线段树基础的功能一样 线段树模板的链接 lowbit(x)覆盖长度 c[x]的父节点t[x + lowbit(x)] 单点修改 区间查询 P3374 【模板】树状数组 1 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 #defi 阅读全文
posted @ 2020-02-06 10:54 Hazelxcf 阅读(77) 评论(0) 推荐(0)