请注意当树状数组未存储任何值时,不要计入答案
来自:https://www.luogu.com.cn/discuss/854135
https://www.luogu.com/discuss/468892