| MITIT 2024 Advanced Round |
|---|
| Finished |
Busy Beaver likes data structure problems, but he thinks that data structure problems on arrays with interval queries are boring. So he came up with a different kind of data structure problem, with multisets!
There is a sequence $$$a_1, \dots, a_L$$$, where each $$$a_i$$$ is a multiset of positive integers. Initially, the sequence is empty, i.e. $$$L=0$$$. Implement the following operations:
The first line of input contains a single integer $$$Q$$$ ($$$1 \le Q \le 5 \cdot 10^5$$$), the number of operations.
The next $$$Q$$$ lines contain one operation each.
It is guaranteed that:
For each type $$$4$$$ operation, output a line with the answer.
81 5 11 6 24 12 1 23 3 6 43 4 6 53 5 5 14 6
5 6
The multisets are as follows:
| Name |
|---|


