Optimal Parking --------------- While on vacation in Vesria, Eric has rented a car. He wants to go for some shopping at Main Street. Rather than parking his car at some random location and then walking to the stores he needs to visit, Eric wants to choose a place to park which minimises the distance he needs to walk on his shopping spree. Main Street is a straight line, where all positions of the shops are integer. Eric of course has to pay for parking in a specific spot, which is an integer position on Main Street. Eric does not want to pay for more than once for parking though. As we all know, he is very strong, and he does not mind carrying all the bags around. Input ----- The first line of input gives the number of test cases, 1 <= t <= 100. There are two lines for each test case. The first gives the number of stores Eric wants to visit, 1 <= n <= 20, and the second gives their n integer positions on Main Street, 0 <= xi <= 99. Output ------ Output for each test case a line with the minimal distance Eric must walk given his optimal parking. Sample Input ------------ 2 4 24 13 89 37 6 7 30 41 14 39 42 Sample Output ------------- 152 70