如何使用二进制索引树(BIT)找到一定长度的增加子序列的总数?
实际上这是Spoj Online Judge的一个问题
示例 假设我有一个数组1,2,2,10
1,2,2,10
增加的长度为3的子序列是1,2,4和1,3,4
1,2,4
1,3,4
所以,答案是2.
2
algorithm sequence data-structures fenwick-tree binary-indexed-tree
algorithm ×1
binary-indexed-tree ×1
data-structures ×1
fenwick-tree ×1
sequence ×1