//No.135 とりあえず1次元の問題 import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No135 { static final InputStream in = System.in; static final PrintWriter out = new PrintWriter(System.out,false); static void solve(){ int n = nextInt(); int[] x = nextArrayInt(n); if (n == 1) { out.println("0"); return; } sort(x); int min = Integer.MAX_VALUE; for (int i=0; i