随笔分类 -  数据结构树状数组

摘要:Bryce1010模板 https://vjudge.net/contest/239647#problem/C 【POJ2299】 树状数组求逆序数#includeusing namespace std;#define ll long longconst int MA... 阅读全文
posted @ 2018-07-20 11:40 Bryce1010 阅读(69) 评论(0) 推荐(0)
摘要:Bryce1010模板 1、一维树状数组 https://vjudge.net/contest/239647#problem/A【HDU1556】#includeusing namespace std;#define ll long longconst int MAX... 阅读全文
posted @ 2018-07-20 10:43 Bryce1010 阅读(84) 评论(0) 推荐(0)
摘要:Bryce1010模板http://acm.hdu.edu.cn/showproblem.php?pid=1556#includeusing namespace std;#define ll long longconst int MAXN=1e5+10;int n,c... 阅读全文
posted @ 2018-07-20 09:55 Bryce1010 阅读(78) 评论(0) 推荐(0)
摘要:前言先推荐几个讲解的比较好的博客或视频: 树状数组基础及应用一、树状数组的应用树状数组解决区间和树状数组解决单点查询 模板如下:int d[100005],n;int lowbit(int x){ return x&(-x);}int query(int x)/... 阅读全文
posted @ 2018-05-05 00:33 Bryce1010 阅读(85) 评论(0) 推荐(0)