Maintain a dynamic sequence under point updates, deletions, and insertions, answering range queries for distinct count and the sum of triple products of distinct values.
Hard9Segment treeHash mapCombinatoricsImplementationNo attempts yetTime limit2sMemory limit512 MB