As the problem title suggests, you need to count the number of swaps required to sort a given list of integers in ascending order using the selection sort algorithm.

First line of the input contains the number of test cases **T**. T test cases follow. The first line of each test case contains the **N**, (1 ≤ N ≤ 50) the number of integers in the array. The second line contains N space separated integers. All N numbers are distinct.

For each test case, print on one line, the number of swaps (minimum) to sort the given array in ascending order using selection sort.

2 3 4 2 5 5 10 11 8 7 1

1 3