What
TreeMultiSet is an implementation of a multiset that allows duplicate elements. This data structure maintains a sorted state as elements are added, and supports iterators and range queries, offering more flexibility in operations.
Iterator
Iterator Support: Easily iterate through elements using the provided iterator.
Range Query Support: Utilize the range method to iterate over elements within a specific range, allowing extraction of elements within a defined range.
Example
ABC241 D - Sequence Query: https://atcoder.jp/contests/abc241/submissions/49645890
ABC212 D - Querying Multiset: https://atcoder.jp/contests/abc212/submissions/49645865