Return the smallest integer k between start (inclusive) and end (exclusive)
such that the product from the start-th element (inclusive) to the k-th
element (inclusive) holds p. If no such k exists, return end.
The first element is at position 0 (0-based).
p must be increasing.
Return the product from the left-th element (inclusive) to right-th element (exclusive).
The first element is at position 0 (0-based).
Create a segment tree.
Set a value to an element. The first element is at position 0 (0-based).
Apply a function to an element. The first element is at position 0 (0-based).
Segment tree
Segment tree is a data structure for efficient range operations on sequences.
Notes:
segtreecan handle matrix production and range union.Usage:
.