Jelefy is playing the Tower of Hanoi with a special rule.
The Tower of Hanoi has three pillars, $$$A$$$, $$$B$$$, and $$$C$$$, on which disks can be stacked. Disks can be moved between different pillars, but must adhere to the following rules:
At the beginning, Jelefy randomly stacks $$$n$$$ disks of different sizes on pillar $$$A$$$ and leaves pillars $$$B$$$ and $$$C$$$ empty. Under the above conditions, Jelefy wants to know how many moves are needed to move all the disks from pillar $$$A$$$ to pillar $$$B$$$.
The first line contains an integer $$$T$$$ ($$$1\leq T\leq 10^4$$$), indicating the number of test cases.
For each test case: The first line contains an integer $$$n$$$ ($$$1\leq n\leq 10^5$$$), representing the number of disks on pillar $$$A$$$ in the initial state.
The second line contains $$$n$$$ integers $$$p_1,p_2,\ldots,p_n$$$ ($$$1\leq p_i\leq n$$$), where $$$p_i$$$ represents the diameter of the $$$i$$$-th disk on pillar $$$A$$$ from bottom to top. It is guaranteed that $$$p_1,p_2,\ldots,p_n$$$ form a permutation of length $$$n$$$, i.e., each integer from $$$1$$$ to $$$n$$$ appears exactly once in the sequence.
For all test cases, it is guaranteed that $$$\sum n\leq 2\times 10^5$$$.
For each test case, output an integer on a single line, representing the minimum number of moves required.
351 5 3 2 451 2 3 4 565 3 6 1 4 2
11519
In the first example, one possible solution with the minimum number of moves is as follows ($$$X\rightarrow Y$$$ indicates moving the top disk from pillar $$$X$$$ to the top of pillar $$$Y$$$):
| Name |
|---|


