You are playing a game on array $$$a_1, a_2, \ldots, a_n$$$. Each turn you will do the following:
You want to finish this game in a minimal number of turns.
Given an array $$$a_1, a_2, \ldots, a_n$$$ of length $$$n$$$ and $$$q$$$ queries of two types:
Good luck!
The first line contains two integers $$$n$$$ and $$$q$$$ $$$(1 \le n, q \le 10^5)$$$ — the length of the array and the number of queries.
The second line contains $$$n$$$ integers $$$a_1, a_2, \ldots, a_n$$$ $$$(0 \le a_i \le 10^9)$$$ — initial permutations.
The next $$$q$$$ lines contain descriptions of queries — $$$1\ l\ r\ x$$$ $$$(1 \le l \le r \le n, 0 \le x \le 10^9)$$$ or $$$2\ l\ r$$$ $$$(1 \le l \le r \le n)$$$.
It is guaranteed that there is at least one second-type query.
For each query of the second type, print the minimal number of turns to finish the game.
5 101 2 3 1 52 1 51 1 4 102 1 51 5 5 61 4 5 22 1 51 2 2 12 1 51 1 1 22 1 5
1 2 2 2 1
| Name |
|---|


