数状数组模板 树状数组原理详解: https://zhuanlan.zhihu.com/p/25185969 class BIT { int n; int[] tree; public BIT(int n) { this.n = n; this