摘要: Chapter 5 树状数组和线段树 +++ 树状数组 1.单点修改 2.区间查询 原数组下标从1开始,假如树状数组是c[],那么c[x], x的二进制表示最后有几个0就是第几层 假设是第k层。那么c[x] = (x lowbit(x),x]。lowbit(x) = 2 ^ k 1.动态求连续区间和 阅读全文
posted @ 2020-03-09 13:31 sunnyday0725 阅读(73) 评论(0) 推荐(0) 编辑