Problem: Drazil likes heap very much. So he created a problem with heap:
There is a max heap with a height implemented on the array. The details of this heap are the following:
This heap contains exactly distinct positive non-zero integers. All integers are distinct. These numbers are stored in the array indexed from to . For any , .
Now we want to reduce the height of this heap such that the height becomes with exactly numbers in heap. To reduce the height, we should perform the following action times:
Choose an index , which contains an element and call the following function in index :
Note that we suppose that if , then index don't contain an element.
After all operations, the remaining element must be located in indices from to . Now Drazil wonders what's the minimum possible sum of the remaining elements. Please find this sum and find a sequence of the function calls to achieve this value.
Input Format: The first line of the input contains an integer (): the number of test cases.
Each test case contain two lines. The first line contains two integers and (). The second line contains distinct positive integers (). For all from to , .
The total sum of is less than .
Output Format: For each test case, print two lines.
The first line should contain one integer denoting the minimum sum after reducing the height of heap to . The second line should contain integers . In -th operation should be called.