树状数组(Binary Indexed Tree,BIT)是能够完成下述操作的数据结构。
给一个初始值全为0的数列a1,a2,...,an;
基于线段树的实现
BIT的结构
BIT的求和
BIT的值的更新
BIT的复杂度
BIT的实现
二维BIT
——《挑战程序设计竞赛(第二版)》
树状树状(二叉索引树)较为详细的讲解
3.2 区间信息的维护与查询 ——《算法竞赛入门经典 训练指南》 刘汝佳 陈锋