Alex has an array $$$a_1,a_2,...,a_n$$$. A subarray $$$a_l, a_{l+1},...,a_r$$$ is good if both of the following are true:
In one operation, Alex can remove any good subarray $$$a_l, a_{l+1},...,a_r$$$ for a cost of $$$\lfloor \frac{r-l+1}{2} \rfloor$$$. He can perform the operation as many times as he likes (possibly zero times). Find the minimum size of the array that he can get as well as the minimum cost to obtain an array of minimum size.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ $$$(1 \leq t \leq 100)$$$. The description of the test cases follows.
The first line of each testcase contains $$$2$$$ integers, $$$n$$$ and $$$k$$$ $$$(1 \leq n \leq 500, 0 \leq k \leq 10^9)$$$.
The second line contains $$$n$$$ integers, $$$a_1, a_2,..., a_n$$$ $$$(1 \leq a_i \leq 10^9)$$$.
It is guaranteed that the sum of $$$n$$$ over all test cases doesn't exceed $$$500$$$.
For each test case output $$$2$$$ integers, the minimum size of the array that Alex can get followed by the minimum cost to obtain an array of minimum size.
56 01 1 5 5 1 16 41 1 5 5 1 16 14 3 3 1 1 610 23 5 3 6 4 2 2 3 3 81 01
0 3 0 2 1 2 0 4 1 0
In the first test case, the array is initially $$$[1, 1, 5, 5, 1, 1]$$$. Alex can remove subarray $$$[5, 5]$$$ for a cost of $$$1$$$ causing the array to become $$$[1, 1, 1, 1]$$$. He can then remove subarray $$$[1, 1, 1, 1]$$$ for a cost of $$$2$$$ causing the array to become empty.
In the second test case, the array is initially $$$[1, 1, 5, 5, 1, 1]$$$. Alex can remove subarray $$$[1, 1, 5]$$$ for a cost of $$$1$$$ causing the array to become $$$[5, 1, 1]$$$. He can then remove subarray $$$[5, 1, 1]$$$ for a cost of $$$1$$$ causing the array to become empty.
Problem Credits: Alex Liang and Larry Xing