import java.util.*;
public class a792 {
        public static void main(String args[])
        {
            Scanner ob=new Scanner(System.in);
            int n=ob.nextInt();
            int a[]=new int[n];
            for(int i=0;i<n;i++)
                a[i]=ob.nextLong();
            Arrays.sort(a);
            int s=0;
            int min=Integer.MAX_VALUE;
            long c=0;
            for(int i=0;i<n-1;i++)
            {
                c=Math.abs(a[i]-a[i+1]);
                if(c==min)
                    s++;
                if(c<min)
                {
                    min=c;
                    s=1;
                }

            }
            System.out.println(min+" "+s);
        }
}


import java.util.*;
public class a792 {
        public static void main(String args[])
        {
            Scanner ob=new Scanner(System.in);
            int n=ob.nextInt();
            int a[]=new int[n];
            for(int i=0;i<n;i++)
                a[i]=ob.nextInt();
            Arrays.sort(a);
            int s=0;
            int min=Integer.MAX_VALUE;
            int c=0;
            for(int i=0;i<n-1;i++)
            {
                c=Math.abs(a[i]-a[i+1]);
                if(c==min)
                    s++;
                if(c<min)
                {
                    min=c;
                    s=1;
                }

            }
            System.out.println(min+" "+s);
        }
}


import java.util.*;
public class a792 {
        public static void main(String args[])
        {
            Scanner ob=new Scanner(System.in);
            int n=ob.nextInt();
            int a[]=new int[n];
            for(int i=0;i<n;i++)
                a[i]=ob.nextLong();
            Arrays.sort(a);
            int s=0;
            int min=Integer.MAX_VALUE;
            int c=0;
            for(int i=0;i<n-1;i++)
            {
                c=Math.abs(a[i]-a[i+1]);
                if(c==min)
                    s++;
                if(c<min)
                {
                    min=c;
                    s=1;
                }

            }
            System.out.println(min+" "+s);
        }
}


import java.util.*;
public class a792 {
        public static void main(String args[])
        {
            Scanner ob=new Scanner(System.in);
            int n=ob.nextInt();
            int a[]=new int[n];
            for(int i=0;i<n;i++)
                a[i]=ob.nextLong();
            Arrays.sort(a);
            int s=0;
            long min=Integer.MAX_VALUE;
            long c=0;
            for(int i=0;i<n-1;i++)
            {
                c=Math.abs(a[i]-a[i+1]);
                if(c==min)
                    s++;
                if(c<min)
                {
                    min=c;
                    s=1;
                }

            }
            System.out.println(min+" "+s);
        }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.DataInputStream;
import java.util.Arrays;
import java.util.Random;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Read in = new Read(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Read in, PrintWriter out) {
            int n = in.nextInt();
            Integer a[] = new Integer[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            a = shuffle(a, new Random());
            Arrays.sort(a);
            int min = Integer.MAX_VALUE, f = 0;
            int curr = 0;
            for (int i = 0; i < n - 1; i++) {
                curr = Math.abs(a[i + 1] - a[i]);
                if (curr == min) {
                    f++;
                } else if (curr < min) {
                    min = curr;
                    f = 1;
                }
            }
            out.println(min + " " + f);
        }

        public static Integer[] shuffle(Integer[] a, Random gen) {
            for (int i = 0, n = a.length; i < n; i++) {
                int ind = gen.nextInt(n - i) + i;
                int d = a[i];
                a[i] = a[ind];
                a[ind] = d;
            }
            return a;
        }

    }

    static class Read {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer;
        private int bytesRead;

        public Read(InputStream inputStream) {
            din = new DataInputStream(inputStream);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Read(String file_name) {
            try {
                din = new DataInputStream(new FileInputStream(file_name));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public int nextInt() {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() {
            try {
                bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.io.DataInputStream;
import java.util.Arrays;
import java.io.IOException;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        Read in = new Read(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA {
        public void solve(int testNumber, Read in, PrintWriter out) {
            int n = in.nextInt();
            int a[] = new int[n];
            for (int i = 0; i < n; i++) {
                a[i] = in.nextInt();
            }
            Arrays.sort(a);
            int min = Integer.MAX_VALUE, f = 0;
            for (int i = 0; i < n - 1; i++) {
                int curr = Math.abs(a[i + 1] - a[i]);
                if (curr == min) {
                    f++;
                } else if (curr < min) {
                    min = curr;
                    f = 1;
                }
            }
            out.println(min + " " + f);
        }

    }

    static class Read {
        final private int BUFFER_SIZE = 1 << 16;
        private DataInputStream din;
        private byte[] buffer;
        private int bufferPointer;
        private int bytesRead;

        public Read(InputStream inputStream) {
            din = new DataInputStream(inputStream);
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public Read(String file_name) {
            try {
                din = new DataInputStream(new FileInputStream(file_name));
            } catch (FileNotFoundException e) {
                e.printStackTrace();
            }
            buffer = new byte[BUFFER_SIZE];
            bufferPointer = bytesRead = 0;
        }

        public int nextInt() {
            int ret = 0;
            byte c = read();
            while (c <= ' ')
                c = read();
            boolean neg = (c == '-');
            if (neg)
                c = read();
            do {
                ret = ret * 10 + c - '0';
            } while ((c = read()) >= '0' && c <= '9');

            if (neg)
                return -ret;
            return ret;
        }

        private void fillBuffer() {
            try {
                bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (bytesRead == -1)
                buffer[0] = -1;
        }

        private byte read() {
            if (bufferPointer == bytesRead)
                fillBuffer();
            return buffer[bufferPointer++];
        }

    }
}


import javax.swing.*;
import java.io.*;
import java.math.*;
import java.util.*;

// author @mdazmat9
public class codeforces{
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int test = 1;
        for (int ind = 0; ind < test; ind++) {
            int n=sc.nextInt();
            int[] a=new int[n];
            for(int i=0;i<n;i++)
                a[i]=sc.nextInt();
            sort(a,0,n-1);
            int count=0;
            int min=Integer.MAX_VALUE;
            for(int i=0;i<n-1;i++){
                int diff=(a[i+1]-a[i]);
                if(diff==min)
                    count++;
                if(diff<min) {
                    min = diff;
                    count=1;
                }
            }

            out.println(min+" "+count);
        }
        out.flush();

    }
    static int partition(int arr[], int low, int high)
    {
        int pivot = arr[high];
        int i = (low-1); // index of smaller element
        for (int j=low; j<high; j++)
        {
            // If current element is smaller than or
            // equal to pivot
            if (arr[j] <= pivot)
            {
                i++;

                // swap arr[i] and arr[j]
                int temp = arr[i];
                arr[i] = arr[j];
                arr[j] = temp;
            }
        }

        // swap arr[i+1] and arr[high] (or pivot)
        int temp = arr[i+1];
        arr[i+1] = arr[high];
        arr[high] = temp;

        return i+1;
    }

    /* The main function that implements QuickSort()
      arr[] --> Array to be sorted,
      low  --> Starting index,
      high  --> Ending index */
   static void sort(int arr[], int low, int high)
    {
        if (low < high)
        {
            /* pi is partitioning index, arr[pi] is
              now at right place */
            int pi = partition(arr, low, high);

            // Recursively sort elements before
            // partition and after partition
            sort(arr, low, pi-1);
            sort(arr, pi+1, high);
        }
    }

    static long gcd(long a , long b)
    {
        if(b == 0)
            return a;
        return gcd(b , a % b);
    }

}
class Scanner {
    public BufferedReader reader;
    public StringTokenizer st;

    public Scanner(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        st = null;
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = reader.readLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            } catch (Exception e) {
                throw (new RuntimeException());
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

class OutputWriter {
    BufferedWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }

    public void print(int i) throws IOException {
        writer.write(i);
    }

    public void print(String s) throws IOException {
        writer.write(s);
    }

    public void print(char[] c) throws IOException {
        writer.write(c);
    }

    public void close() throws IOException {
        writer.close();
    }

}


import javax.swing.*;
import java.io.*;
import java.math.*;
import java.util.*;

// author @mdazmat9
public class codeforces{
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int test = 1;
        for (int ind = 0; ind < test; ind++) {
           int n=sc.nextInt();
           int[] a=new int[n];
           for(int i=0;i<n;i++)
               a[i]=sc.nextInt();
           Arrays.sort(a);
           int count=0;
           int min=Integer.MAX_VALUE;
           for(int i=0;i<n-1;i++){
               int diff=Math.abs(a[i]-a[i+1]);
               if(diff==min)
                   count++;
               if(diff<min) {
                   min = diff;
                   count=1;
               }
           }

           out.println(min+" "+count);
        }
        out.flush();

    }

    static long gcd(long a , long b)
    {
        if(b == 0)
            return a;
        return gcd(b , a % b);
    }

}
class Scanner {
    public BufferedReader reader;
    public StringTokenizer st;

    public Scanner(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        st = null;
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = reader.readLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            } catch (Exception e) {
                throw (new RuntimeException());
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

class OutputWriter {
    BufferedWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }

    public void print(int i) throws IOException {
        writer.write(i);
    }

    public void print(String s) throws IOException {
        writer.write(s);
    }

    public void print(char[] c) throws IOException {
        writer.write(c);
    }

    public void close() throws IOException {
        writer.close();
    }

}


import javax.swing.*;
import java.io.*;
import java.math.*;
import java.util.*;

// author @mdazmat9
public class codeforces{
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int test = 1;
        for (int ind = 0; ind < test; ind++) {
           int n=sc.nextInt();
           int[] a=new int[n];
           for(int i=0;i<n;i++)
               a[i]=sc.nextInt();
           Arrays.sort(a);
           int min=Integer.MAX_VALUE;
           for(int i=0;i<n-1;i++){
               int diff=Math.abs(a[i]-a[i+1]);
               if(diff<min)
                   min=diff;
           }
           int count=0;
            for(int i=0;i<n-1;i++){
                int diff=Math.abs(a[i]-a[i+1]);
                if(diff==min)
                    count++;
            }
           out.println(min+" "+count);
        }
        out.flush();

    }

    static long gcd(long a , long b)
    {
        if(b == 0)
            return a;
        return gcd(b , a % b);
    }

}
class Scanner {
    public BufferedReader reader;
    public StringTokenizer st;

    public Scanner(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        st = null;
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = reader.readLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            } catch (Exception e) {
                throw (new RuntimeException());
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

class OutputWriter {
    BufferedWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }

    public void print(int i) throws IOException {
        writer.write(i);
    }

    public void print(String s) throws IOException {
        writer.write(s);
    }

    public void print(char[] c) throws IOException {
        writer.write(c);
    }

    public void close() throws IOException {
        writer.close();
    }

}


import javax.swing.*;
import java.io.*;
import java.math.*;
import java.util.*;

// author @mdazmat9
public class codeforces{
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int test = 1;
        for (int ind = 0; ind < test; ind++) {
            int n=sc.nextInt();
            int[] a=new int[n];
            for(int i=0;i<n;i++)
                a[i]=sc.nextInt();
            shuffle(a);
           Arrays.sort(a);
            int count=0;
            int min=Integer.MAX_VALUE;
            for(int i=0;i<n-1;i++){
               int  diff=(a[i+1]-a[i]);
                if(diff==min)
                    count++;
                if(diff<min) {
                    min = diff;
                    count=1;
                }
            }

            out.println(min+" "+count);
        }
        out.flush();

    }
  static   void shuffle(int[] a) {
        int n = a.length;
        for(int i = 0; i < n; i++) {
            int r = i + (int) (Math.random() * (n - i));
            int tmp = a[i];
            a[i] = a[r];
            a[r] = tmp;
        }
    }
    static long gcd(long a , long b)
    {
        if(b == 0)
            return a;
        return gcd(b , a % b);
    }

}
class Scanner {
    public BufferedReader reader;
    public StringTokenizer st;

    public Scanner(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        st = null;
    }

    public String next() {
        while (st == null || !st.hasMoreTokens()) {
            try {
                String line = reader.readLine();
                if (line == null) return null;
                st = new StringTokenizer(line);
            } catch (Exception e) {
                throw (new RuntimeException());
            }
        }
        return st.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }

    public long nextLong() {
        return Long.parseLong(next());
    }

    public double nextDouble() {
        return Double.parseDouble(next());
    }
}

class OutputWriter {
    BufferedWriter writer;

    public OutputWriter(OutputStream stream) {
        writer = new BufferedWriter(new OutputStreamWriter(stream));
    }

    public void print(int i) throws IOException {
        writer.write(i);
    }

    public void print(String s) throws IOException {
        writer.write(s);
    }

    public void print(char[] c) throws IOException {
        writer.write(c);
    }

    public void close() throws IOException {
        writer.close();
    }

}


import java.util.*;

public class problem792A {
	private static Scanner in = new Scanner(System.in);
	private static int n = 0, count = 0;
	private static long minDistance = 1000000000;
	private static ArrayList<Long> cities = new ArrayList<Long>();
	public static void main(String[] args) {
		n = in.nextInt();
		for (int i = 0; i < n; i++ ) cities.add(in.nextLong());
		Collections.sort(cities);
		for (int i = 0; i < (n - 1); i++) {
			long distance = Math.abs(cities.get(i) - cities.get(i + 1));
			if (distance < minDistance) {
				minDistance = distance;
				count = 1;
			}
			else if (distance == minDistance) count++;
		}
		System.out.println(minDistance + " " + count);
	}
}


import java.util.*;

public class problem792A {
	private static Scanner in = new Scanner(System.in);
	private static int n = 0, count = 1;
	private static long minDistance = 2000000001;
	private static ArrayList<Long> cities = new ArrayList<Long>();
	public static void main(String[] args) {
		n = in.nextInt();
		for (int i = 0; i < n; i++ ) cities.add(in.nextLong());
		Collections.sort(cities);
		for (int i = 0; i < (n - 1); i++) {
			long distance = Math.abs(cities.get(i) - cities.get(i + 1));
			if (distance < minDistance) {
				minDistance = distance;
				count = 1;
			}
			else if (distance == minDistance) count++;
		}
		System.out.println(minDistance + " " + count);
	}
}


import java.util.*;

public class problem792A {
	private static Scanner in = new Scanner(System.in);
	private static int n = 0, count = 1;
	private static long minDistance = 1000000000;
	private static ArrayList<Long> cities = new ArrayList<Long>();
	public static void main(String[] args) {
		n = in.nextInt();
		for (int i = 0; i < n; i++ ) cities.add(in.nextLong());
		Collections.sort(cities);
		for (int i = 0; i < (n - 1); i++) {
			long distance = Math.abs(cities.get(i) - cities.get(i + 1));
			if (distance < minDistance) {
				minDistance = distance;
				count = 1;
			}
			else if (distance == minDistance) count++;
		}
		System.out.println(minDistance + " " + count);
	}
}


import java.io.*;
import java.util.*;

public class NewRoute {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String args[]) {

        int n = input.nextInt();
        Long a[] = new Long[n];
        for (int i = 0; i < n; i++)
            a[i] = input.nextLong();
        Arrays.sort(a);
        int num = 0;
        long min = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            long t = a[i] - a[i - 1];
            if (t == min)
                num++;
            if (t < min) {
                min = t;
                num = 1;
            }
        }
        System.out.println(min + " " + num);
    }
}


import java.io.*;
import java.util.*;

public class NewRoute {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String args[]) {

        int n = input.nextInt();
        Long a[] = new Long[n];
        for (int i = 0; i < n; i++)
            a[i] = input.nextLong();
        Arrays.sort(a);
        int num = 0;
        long min = Integer.MAX_VALUE;
        for (int i = 0; i < n - 1; i++) {
            long t = Math.abs(a[i] - a[i + 1];
            if (t == min)
                num++;
            if (t < min) {
                min = t;
                num = 1;
            }
        }
        System.out.println(min + " " + num);
    }
}


// TIM;

import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        int n = input.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = input.nextInt();
        }
        Arrays.sort(a, 0, n);
        int min = Integer.MAX_VALUE;
        int num = 0;
        for (int i = 1; i < n; i++) {
            int t = Math.abs(a[i - 1] - a[i]);
            if (t < min) {
                min = t;
                num = 0;
            }
            if (t == min)
                num++;
        }
        System.out.println(min + " " + num);
    }
}


//package TIM;

import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        int n = input.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = input.nextInt();
        }
        Arrays.sort(a, 0, n);
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            int t = Math.abs(a[i - 1] - a[i]);
            if (t < min) min = t;
        }
        int num = 0;
        for (int i = 0; i < n; i++) {
            for (int j = i + 1; j < n; j++) {
                if (Math.abs(a[i] - a[j]) == min)
                    num++;
            }
        }
        System.out.println(min + " " + num);
    }
}


import java.util.*;
public class NewRoute

{ static Scanner ob=new Scanner(System.in);
	public static void main(String args[])
	{

		int n=ob.nextInt();
		Long a[]=new Long[n];
		for(int i=0;i<n;i++)
			a[i]=ob.nextLong();
		Arrays.sort(a);
		int s=0;
		long min=Integer.MAX_VALUE;
		for(int i=0;i<n-1;i++)
		{
			if(Math.abs(a[i]-a[i+1])==min)
				s++;
			if(Math.abs(a[i]-a[i+1])<min)
			{
				min=Math.abs(a[i]-a[i+1]);
				s=1;
			}

		}

		System.out.println(min+" "+s);
	}
}


//package TIM;

import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        int n = input.nextInt();
        Long[] a = new Long[n];
        for (int i = 0; i < n; i++) {
            a[i] = input.nextLong();
        }
        Arrays.sort(a);
        long min = Integer.MAX_VALUE;
        int num = 0;
        long t;
        for (int i = 1; i < n; i++) {
            t = a[i] - a[i - 1];
            if (t < min) {
                min = t;
                num = 1;
                continue;
            }
            if (t == min)
                num++;
        }
        System.out.println(min + " " + num);
    }
}


//package TIM;

import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        int n = input.nextInt();
        long[] a = new long[n];
        for (int i = 0 ; i < n; i++) {
            a[i] = input.nextLong();
        }
        Arrays.sort(a);
        long min = Integer.MAX_VALUE;
        int num = 0;
        long t;
        for (int i = 1; i < n; i++) {
            t = a[i] - a[i - 1];
            if (t < min) {
                min = t;
                num = 1;
                continue;
            }
            if (t == min)
                num++;
        }
        System.out.println(min + " " + num);
    }
}


import java.io.*;
import java.util.*;

public class NewRoute {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String args[]) {

        int n = input.nextInt();
        Long a[] = new Long[n];
        for (int i = 0; i < n; i++)
            a[i] = input.nextLong();
        Arrays.sort(a);
        int num = 0;
        long min = Integer.MAX_VALUE;
        for (int i = 0; i < n - 1; i++) {
            long t = Math.abs(a[i] - a[i + 1]);
            if (t == min)
                num++;
            if (t < min) {
                min = t;
                num = 1;
            }
        }
        System.out.println(min + " " + num);
    }
}


//package TIM;

import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        int n = input.nextInt();
        long[] a = new long[n];
        for (int i = 0; i < n; i++)
            a[i] = input.nextLong();
        Arrays.sort(a);
        int num = 0;
        long min = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            long t = a[i] - a[i - 1];
            if (t == min)
                num++;
            if (t < min) {
                min = t;
                num = 1;
            }
        }
        System.out.println(min + " " + num);
    }
}


//package TIM;

import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        int n = input.nextInt();
        int[] a = new int[n];
        for (int i = 0; i < n; i++) {
            a[i] = input.nextInt();
        }
        Arrays.sort(a, 0, n);
        int min = Integer.MAX_VALUE;
        for (int i = 1; i < n; i++) {
            int t = Math.abs(a[i - 1] - a[i]);
            if (t < min) min = t;
        }
        int num = 0;
        for (int i = 1; i < n; i++) {
            if (Math.abs(a[i] - a[i - 1]) == min)
                num++;
        }
        System.out.println(min + " " + num);
    }
}


//package TIM;

import java.io.*;
import java.lang.*;
import java.math.*;
import java.util.*;

public class Main {
    static Scanner input = new Scanner(System.in);
    static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    static PrintWriter pw = new PrintWriter(System.out);

    public static void main(String[] args) throws IOException {
        int n = input.nextInt();
        long[] a = new long[n];
        for (int i = 0; i < n; i++) {
            a[i] = input.nextLong();
        }
        Arrays.sort(a);
        long min = Integer.MAX_VALUE;
        int num = 0;
        long t;
        for (int i = 1; i < n; i++) {
            t = a[i] - a[i - 1];
            if (t < min) {
                min = t;
                num = 1;
                continue;
            }
            if (t == min)
                num++;
        }
        System.out.println(min + " " + num);
    }
}


#include<bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a) - 1; i>=(b);i--)
#define rep(i,n) FOR(i,0,n)
#define PB push_back
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FILL(a, value) memset(a, value, sizeof(a))
#define IOS ios_base::sync_with_stdio(0),cin.tie(0), cout.tie(0);

typedef  long long LL ;
typedef  vector<int > VI ;
typedef vector<LL > VL;
typedef pair<int,int > PII;
typedef pair<LL,LL> PLL;

const LL LINF = (LL)1e18 +47;
const int INF =  (int)1e9  +47  ;
const int MOD =(int)1e9 + 7 ;
const int modulo = 998244353 ;
const int nax = 3 * (int )1e5 + 10 ;
const double EPS = 1e-7;
const double PI = acos(-1.0);

const int MAX = 1001;

double  a[nax];
int  n;
double l;
double d2(double time)
{
    reverse(a,a + n);

    if(time <=l - a[0])
    {
        return time ;
    }
    double cur_time  = time - (l - a[0]);
    double d =(l - a[0]);
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i - 1] - a[i]) / v;
        if(val <= cur_time) {
            d += a[i - 1] - a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            d += cur_time * v;
            cur_time = 0;
            break;
        }
    }
    reverse(a,a + n);

    return min(l,d + v * cur_time);
}
double d1(double time)
{
    if(time <=a[0])
    {
        return min(l,time) ;
    }
    double cur_time  =time - a[0];
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i] - a[i - 1]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] + cur_time * v;
            cur_time = 0;
            break;
        }
    }
    return min((double)l,pos + cur_time * v);
}
int main() {
    IOS
    int tt;
    cin >> tt;
    FOR(test,0,tt)
    {
        cin >> n >> l ;
        rep(i,n)cin >> a[i];
        //cout << d1(3.0) << ' ' << d2(3.0) << '\n';
        double lf = 0;
        double rg = INF ;
        rep(i,120)
        {
            double mid = (lf + rg) * 0.5;
            if(d1(mid) + d2(mid) < l )lf = mid;
            else rg = mid;
        }
        cout << fixed << setprecision(7) <<  (lf +rg) * 0.5 << '\n';
   }
}


#include<bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a) - 1; i>=(b);i--)
#define rep(i,n) FOR(i,0,n)
#define PB push_back
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FILL(a, value) memset(a, value, sizeof(a))
#define IOS ios_base::sync_with_stdio(0),cin.tie(0), cout.tie(0);

typedef  long long LL ;
typedef  vector<int > VI ;
typedef vector<LL > VL;
typedef pair<int,int > PII;
typedef pair<LL,LL> PLL;

const LL LINF = (LL)1e18 +47;
const int INF =  (int)1e9  +47  ;
const int MOD =(int)1e9 + 7 ;
const int modulo = 998244353 ;
const int nax = 3 * (int )1e5 + 10 ;
const double EPS = 1e-6;
const double PI = acos(-1.0);

const int MAX = 1001;

int a[nax];
int n,l;
double pos2(double time)
{
    reverse(a,a + n);
    if(time <=l - a[0])
    {
        return l - time ;
    }
    double cur_time  = time - (l - a[0]);
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i - 1] - a[i]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] - cur_time * v;
            cur_time = 0;
            break;
        }
    }
    reverse(a,a + n);
    return max((double)0,pos - cur_time * v);
}
double pos1(double time)
{
    if(time <=a[0])
    {
        return time ;
    }
    double cur_time  =time - a[0];
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i] - a[i - 1]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] + cur_time * v;
            cur_time = 0;
            break;
        }
    }
    return min((double)l,pos + cur_time * v);
}
int main() {
    IOS
    int tt;
    cin >> tt;
    FOR(test,0,tt)
    {
        cin >> n >> l ;
        rep(i,n)cin >> a[i];
        double lf = 0;
        double rg = INF ;
        while(rg -lf  > EPS)
        {
           // cout << lf << ' ' <<rg << '\n';
            double mid = (lf + rg) / 2;
            if(pos1(mid) <= pos2(mid))lf = mid;
            else rg =mid;
        }
        cout << fixed << setprecision(6) << lf << '\n';
   }
}


#include<bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a) - 1; i>=(b);i--)
#define rep(i,n) FOR(i,0,n)
#define PB push_back
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FILL(a, value) memset(a, value, sizeof(a))
#define IOS ios_base::sync_with_stdio(0),cin.tie(0), cout.tie(0);

typedef  long long LL ;
typedef  vector<int > VI ;
typedef vector<LL > VL;
typedef pair<int,int > PII;
typedef pair<LL,LL> PLL;

const LL LINF = (LL)1e18 +47;
const int INF =  (int)1e9  +47  ;
const int MOD =(int)1e9 + 7 ;
const int modulo = 998244353 ;
const int nax = 3 * (int )1e5 + 10 ;
const double EPS = 1e-7;
const double PI = acos(-1.0);

const int MAX = 1001;

double  a[nax];
int  n;
double l;
double pos2(double time)
{
    reverse(a,a + n);
    if(time <=l - a[0])
    {
        return l - time ;
    }
    double cur_time  = time - (l - a[0]);
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i - 1] - a[i]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] - cur_time * v;
            cur_time = 0;
            break;
        }
    }
    reverse(a,a + n);
    return max(0.0,pos - cur_time * v);
}
double pos1(double time)
{
    if(time <=a[0])
    {
        return time ;
    }
    double cur_time  =time - a[0];
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i] - a[i - 1]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] + cur_time * v;
            cur_time = 0;
            break;
        }
    }
    return min((double)l,pos + cur_time * v);
}
int main() {
    IOS
    int tt;
    cin >> tt;
    FOR(test,0,tt)
    {
        cin >> n >> l ;
        rep(i,n)cin >> a[i];
        double lf = 0;
        double rg = INF ;
        rep(i,120)
        {
            double mid = (lf + rg) / 2.0;
            if(pos1(mid) < pos2(mid))lf = mid;
            else rg = mid;
        }
        cout << fixed << setprecision(7) << lf << '\n';
   }
}


#include<bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a) - 1; i>=(b);i--)
#define rep(i,n) FOR(i,0,n)
#define PB push_back
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FILL(a, value) memset(a, value, sizeof(a))
#define IOS ios_base::sync_with_stdio(0),cin.tie(0), cout.tie(0);

typedef  long long LL ;
typedef  vector<int > VI ;
typedef vector<LL > VL;
typedef pair<int,int > PII;
typedef pair<LL,LL> PLL;

const LL LINF = (LL)1e18 +47;
const int INF =  (int)1e9  +47  ;
const int MOD =(int)1e9 + 7 ;
const int modulo = 998244353 ;
const int nax = 3 * (int )1e5 + 10 ;
const double EPS = 1e-7;
const double PI = acos(-1.0);

const int MAX = 1001;

int a[nax];
int n,l;
double pos2(double time)
{
    reverse(a,a + n);
    if(time <=l - a[0])
    {
        return l - time ;
    }
    double cur_time  = time - (l - a[0]);
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i - 1] - a[i]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] - cur_time * v;
            cur_time = 0;
            break;
        }
    }
    reverse(a,a + n);
    return max((double)0,pos - cur_time * v);
}
double pos1(double time)
{
    if(time <=a[0])
    {
        return time ;
    }
    double cur_time  =time - a[0];
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i] - a[i - 1]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] + cur_time * v;
            cur_time = 0;
            break;
        }
    }
    return min((double)l,pos + cur_time * v);
}
int main() {
    IOS
    int tt;
    cin >> tt;
    FOR(test,0,tt)
    {
        cin >> n >> l ;
        rep(i,n)cin >> a[i];
        double lf = 0;
        double rg = INF ;
        rep(i,120)
        {
           // cout << lf << ' ' <<rg << '\n';
            double mid = (lf + rg) / 2;
            if(pos1(mid) <= pos2(mid))lf = mid;
            else rg =mid;
        }
        cout << fixed << setprecision(7) << lf << '\n';
   }
}


#include<bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a) - 1; i>=(b);i--)
#define rep(i,n) FOR(i,0,n)
#define PB push_back
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FILL(a, value) memset(a, value, sizeof(a))
#define IOS ios_base::sync_with_stdio(0),cin.tie(0), cout.tie(0);

typedef  long long LL ;
typedef  vector<int > VI ;
typedef vector<LL > VL;
typedef pair<int,int > PII;
typedef pair<LL,LL> PLL;

const LL LINF = (LL)1e18 +47;
const int INF =  (int)1e9  +47  ;
const int MOD =(int)1e9 + 7 ;
const int modulo = 998244353 ;
const int nax = 3 * (int )1e5 + 10 ;
const double EPS = 1e-7;
const double PI = acos(-1.0);

const int MAX = 1001;

double  a[nax];
int  n;
double l;
double d2(double time)
{
    reverse(a,a + n);

    if(time <=l - a[0])
    {
        reverse(a,a+ n);
        return time ;
    }
    double cur_time  = time - (l - a[0]);
    double d =(l - a[0]);
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i - 1] - a[i]) / v;
        if(val <= cur_time) {
            d += a[i - 1] - a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            d += cur_time * v;
            cur_time = 0;
            break;
        }
    }
    reverse(a,a + n);

    return min(l,d + v * cur_time);
}
double d1(double time)
{
    if(time <=a[0])
    {
        return min(l,time) ;
    }
    double cur_time  =time - a[0];
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i] - a[i - 1]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] + cur_time * v;
            cur_time = 0;
            break;
        }
    }
    return min((double)l,pos + cur_time * v);
}
int main() {
    IOS
    int tt;
    cin >> tt;
    FOR(test,0,tt)
    {
        cin >> n >> l ;
        rep(i,n)cin >> a[i];
   //    cout << d1(361644086.1250000) << ' ' << d2(361644086.1250000) << '\n';
        double lf = 0;
        double rg = INF * 2 ;
        rep(i,120)
        {
            double mid = (lf + rg) * 0.5;
            if(d1(mid) + d2(mid) < l )lf = mid;
            else rg = mid;
        }
        cout << fixed << setprecision(7) <<  lf << '\n';
   }
}


#include<bits/stdc++.h>

using namespace std;

#define FOR(i,a,b) for(int i = (a); i < (b); i++)
#define RFOR(i,a,b) for(int i = (a) - 1; i>=(b);i--)
#define rep(i,n) FOR(i,0,n)
#define PB push_back
#define SZ(a) (int)a.size()
#define ALL(a) a.begin(), a.end()
#define FILL(a, value) memset(a, value, sizeof(a))
#define IOS ios_base::sync_with_stdio(0),cin.tie(0), cout.tie(0);

typedef  long long LL ;
typedef  vector<int > VI ;
typedef vector<LL > VL;
typedef pair<int,int > PII;
typedef pair<LL,LL> PLL;

const LL LINF = (LL)1e18 +47;
const int INF =  (int)1e9  +47  ;
const int MOD =(int)1e9 + 7 ;
const int modulo = 998244353 ;
const int nax = 3 * (int )1e5 + 10 ;
const double EPS = 1e-7;
const double PI = acos(-1.0);

const int MAX = 1001;

double  a[nax];
int  n;
double l;
double d2(double time)
{
    reverse(a,a + n);

    if(time <=l - a[0])
    {
        return time ;
    }
    double cur_time  = time - (l - a[0]);
    double d =(l - a[0]);
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i - 1] - a[i]) / v;
        if(val <= cur_time) {
            d += a[i - 1] - a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            d += cur_time * v;
            cur_time = 0;
            break;
        }
    }
    reverse(a,a + n);

    return min(l,d + v * cur_time);
}
double d1(double time)
{
    if(time <=a[0])
    {
        return min(l,time) ;
    }
    double cur_time  =time - a[0];
    double pos = a[0];
    double v = 2;
    FOR(i,1,n)
    {
        double val = ( a[i] - a[i - 1]) / v;
        if(val<=cur_time) {
            pos = a[i];
            cur_time -=val;
            v++;
            continue;
        }
        else
        {
            pos = a[i - 1] + cur_time * v;
            cur_time = 0;
            break;
        }
    }
    return min((double)l,pos + cur_time * v);
}
int main() {
    IOS
    int tt;
    cin >> tt;
    FOR(test,0,tt)
    {
        cin >> n >> l ;
        rep(i,n)cin >> a[i];
        //cout << d1(3.0) << ' ' << d2(3.0) << '\n';
        double lf = 0;
        double rg = INF ;
        rep(i,120)
        {
            double mid = (lf + rg) * 0.5;
            if(d1(mid) + d2(mid) < l )lf = mid;
            else rg = mid;
        }
        cout << fixed << setprecision(7) <<  lf << '\n';
   }
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
//#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	vector <long double> ta(n+2);
	vector <long double> tb(n+2);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	int va=1;
	int vb=1;
	//a
	ta[0]=0;
	long double time=0;
	for(int i=1; i<n+2; i++){
		time+=(((long double)a[i])-a[i-1])/va;
		ta[i]=time;
		va++;
	}
	//b
	time=0;
	for(int i=n+1; i>0; i--){
		time+=(((long double)a[i])-a[i-1])/vb;
		tb[i-1]=time;
		vb++;
	}
	tb[n+1]=0;

	//meet
	if(n==1){
		long double dis = min(a[1],l-a[1]);
		long double ans = dis+(l-2*dis)/3;
		cout<<ans<<endl;
	}
	else{

		int m=0;
		for(int i=0; i<n+2;i++){
			if(tb[i]<=ta[i] && tb[i]>=ta[i-1]) m=i;
		}

		long double ans = tb[m] + ((long double)( a[m]-a[m-1]-(tb[m]-ta[m-1])*m))/(n+2);
		cout<<ans<<endl;
	}

}

int main()
{
	cout << fixed;
    cout << setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
//#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	vector <long double> ta(n+2);
	vector <long double> tb(n+2);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	int va=1;
	int vb=1;
	//a
	ta[0]=0;
	long double time=0;
	for(int i=1; i<n+2; i++){
		time+=(((long double)a[i])-a[i-1])/va;
		ta[i]=time;
		va++;
	}
	//b
	time=0;
	for(int i=n+1; i>0; i--){
		time+=(((long double)a[i])-a[i-1])/vb;
		tb[i-1]=time;
		vb++;
	}
	tb[n+1]=0;

	//meet
	if(n==1){
		long double dis = min(a[1],l-a[0]);
		long double ans = dis+(l-2*dis)/3;
		cout<<ans<<endl;
	}
	else{

		int m=0;
		for(int i=0; i<n+2;i++){
			if(tb[i]<=ta[i] && tb[i]>=ta[i-1]) m=i;
		}

		long double ans = tb[m] + ((long double)( a[m]-a[m-1]-(tb[m]-ta[m-1])*m))/(n+2);
		cout<<ans<<endl;
	}

}

int main()
{
	cout << fixed;
    cout << setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
//#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	vector <long double> ta(n+1);
	vector <long double> tb(n+1);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	int va=1;
	int vb=1;
	//a
	ta[0]=0;
	long double time=0;
	for(int i=1; i<n+2; i++){
		time+=(((long double)a[i])-a[i-1])/va;
		ta[i]=time;
		va++;
	}
	//b
	time=0;
	for(int i=n+1; i>0; i--){
		time+=(((long double)a[i])-a[i-1])/vb;
		tb[i-1]=time;
		vb++;
	}
	tb[n+1]=0;

	//meet
	if(n==1){
		long double dis = min(a[1],l-a[0]);
		long double ans = dis+(l-2*dis)/3;
		cout<<ans<<endl;

		return;
	}

	int m=0;
	for(int i=0; i<n+2;i++){
		if(tb[i]<=ta[i] && tb[i]>=ta[i-1]) m=i;
	}

	long double ans = tb[m] + ((long double)( a[m]-a[m-1]-(tb[m]-ta[m-1])*m))/(n+2);
	cout<<ans<<endl;
	/*
	for(auto p: a){
		cout<<p<<" ";

	}
	cout<<endl;

	for(auto p: ta){
		cout<<p<<" ";

	}
	cout<<endl;
	for(auto p: tb){
		cout<<p<<" ";

	}
	cout<<endl;*/
}

int main()
{
	cout << fixed;
    cout << setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	long double vela=1;
	long double velb=1;

	int posa = 0;
	int posb = n+1;

	long double timea=0;
	long double timeb=0;

	long double ata=0;
	long double atb=0;

	while(posb>posa+1){
		ata = (a[posa+1]-a[posa])/vela;
		atb = (a[posb]-a[posb-1])/velb;

		if(timea + ata < timeb + atb){
			timea += ata;
			vela++;
			posa++;
		}
		else if(timea + ata > timeb + atb){
			timeb += atb;
			velb++;
			posb--;
		}
		else{
			timea += ata;
			vela++;
			posa++;

			timeb += atb;
			velb++;
			posb--;
		}
	}

	long double dist = a[posb]-a[posa] - (max(timea - timeb,(long double)0)*velb + max(timeb - timea,(long double)0)*vela);
	cout<<max(timea,timeb) + dist/(vela+velb)<<endl;

}

int main()
{
	cout << fixed;
    cout << setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
//#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	vector <long double> ta(n+1);
	vector <long double> tb(n+1);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	int va=1;
	int vb=1;
	//a
	ta[0]=0;
	long double time=0;
	for(int i=1; i<n+2; i++){
		time+=(((long double)a[i])-a[i-1])/va;
		ta[i]=time;
		va++;
	}
	//b
	time=0;
	for(int i=n+1; i>0; i--){
		time+=(((long double)a[i])-a[i-1])/vb;
		tb[i-1]=time;
		vb++;
	}
	tb[n+1]=0;

	//meet
	if(n==1){
		long double dis = min(a[1],l-a[0]);
		long double ans = dis+(l-2*dis)/3;
		cout<<ans<<endl;

		return;
	}

	int m=0;
	for(int i=0; i<n+2;i++){
		if(tb[i]<=ta[i] && tb[i]>=ta[i-1]) m=i;
	}

	long double ans = tb[m] + ((long double)( a[m]-a[m-1]-(tb[m]-ta[m-1])*m))/(n+2);
	cout<<ans<<endl;
	/*
	for(auto p: a){
		cout<<p<<" ";

	}
	cout<<endl;

	for(auto p: ta){
		cout<<p<<" ";

	}
	cout<<endl;
	for(auto p: tb){
		cout<<p<<" ";

	}
	cout<<endl;*/
}

int main()
{
	cout << std::fixed;
    cout << std::setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
//#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	vector <long double> ta(n+1);
	vector <long double> tb(n+1);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	int va=1;
	int vb=1;
	//a
	ta[0]=0;
	long double time=0;
	for(int i=1; i<n+2; i++){
		time+=(((long double)a[i])-a[i-1])/va;
		ta[i]=time;
		va++;
	}
	//b
	time=0;
	for(int i=n+1; i>0; i--){
		time+=(((long double)a[i])-a[i-1])/vb;
		tb[i-1]=time;
		vb++;
	}
	tb[n+1]=0;

	//meet

}

int main()
{
	cout << fixed;
    cout << setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
//#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	vector <long double> ta(n+1);
	vector <long double> tb(n+1);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	int va=1;
	int vb=1;
	//a
	ta[0]=0;
	long double time=0;
	for(int i=1; i<n+2; i++){
		time+=(((long double)a[i])-a[i-1])/va;
		ta[i]=time;
		va++;
	}
	//b
	time=0;
	for(int i=n+1; i>0; i--){
		time+=(((long double)a[i])-a[i-1])/vb;
		tb[i-1]=time;
		vb++;
	}
	tb[n+1]=0;

	//meet
	if(n==1){
		long double dis = min(a[1],l-a[0]);
		long double ans = dis+(l-2*dis)/3;
		cout<<ans<<endl;

		return;
	}

	int m=0;
	for(int i=0; i<n+2;i++){
		if(tb[i]<=ta[i] && tb[i]>=ta[i-1]) m=i;
	}

	long double ans = tb[m] + ((long double)( a[m]-a[m-1]-(tb[m]-ta[m-1])*m))/(n+2);
	cout<<ans<<endl;
	return;
}

int main()
{
	cout << fixed;
    cout << setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
#define ll long long

#define pii pair<int,int>
#define pll pair<ll,ll>

#define vi vector<int>
#define vl vector<ll>
//#define vb vector<bool>
#define vpi vetor<pii>
#define vpl vector<pll>
#define pb push_back
#define all(v) v.begin(),v.end()

void cout_vector(vi v){

	for (ll unsigned i=0; i<v.size(); i++) cout << v[i] << " ";
	cout<<endl;
}

int sum_vector(vi v){
	return accumulate(all(v),0);
}

void sort_vector(vi&v){
	sort(all(v));
}

void sort_comp(vi &v, bool func(int,int)){
	sort(all(v),func);
}

bool comp(int a,int b){
	if(a%2==0 && b%2) return true;
	if(b%2==0 && a%2) return false;
	return a<b;
}

ll gcd(ll a, ll b){
	while(a){
		ll temp =a;
		a=b%a;
		b=temp;
	}
	return b;
}

ll lcm(ll a, ll b){
	return (a*b)/gcd(a,b);
}

string binary(ll num){
	string ans="";
	do{
		ans=to_string(num%2)+ans;
		num/=2;
	}while(num);
	return ans;
}

void solve(){
	int n, l;
	cin>>n>>l;
	vi a(n+1);
	vector <long double> ta(n+1);
	vector <long double> tb(n+1);
	a[0]=0;
	for(int i=1; i<n+1; i++){
		cin>>a[i];
	}
	a.pb(l);
	int va=1;
	int vb=1;
	//a
	ta[0]=0;
	long double time=0;
	for(int i=1; i<n+2; i++){
		time+=(((long double)a[i])-a[i-1])/va;
		ta[i]=time;
		va++;
	}
	//b
	time=0;
	for(int i=n+1; i>0; i--){
		time+=(((long double)a[i])-a[i-1])/vb;
		tb[i-1]=time;
		vb++;
	}
	tb[n+1]=0;

	//meet
	if(n==1){
		long double dis = min(a[1],l-a[0]);
		long double ans = dis+(l-2*dis)/3;
		cout<<ans<<endl;
	}
	else{

		int m=0;
		for(int i=0; i<n+2;i++){
			if(tb[i]<=ta[i] && tb[i]>=ta[i-1]) m=i;
		}

		long double ans = tb[m] + ((long double)( a[m]-a[m-1]-(tb[m]-ta[m-1])*m))/(n+2);
		cout<<ans<<endl;
	}

}

int main()
{
	cout << fixed;
    cout << setprecision(12);
	int t;
	cin >>t;
	while(t--) solve();

	return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=1e9+7;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);

const int N=2e5+5;

void solve()
{
   int n;
   long double l;
   cin>>n>>l;
   long double a[n+1];
   for(int i=1;i<=n;i++)
   {
    cin>>a[i];
   }
   long double lw=0,hg=l,e=1e-10,ans=-1;
   while((hg-lw)>e)
   {
    long double mid=(lw+hg)/2.0,dis=0,last=0,sp=1,dis2=0;
    sp=1;
    //mid=5;
    for(int i=1;i<=n;i++)
    {
      if(a[i]<=mid)
      {
        dis+=((a[i]-last)/sp);
        last=a[i];
        sp++;
      }
    }
    dis+=(mid-last)/sp;

    last=l;
    sp=1;
    for(int i=n;i>=1;i--)
    {
      if(a[i]>=mid)
      {
        dis2+=((last-a[i])/sp);
        last=a[i];
        sp++;
      }
    }
    dis2+=(last-mid)/sp;
    //cout<<dis<<" "<<dis2<<" "<<lw<<" "<<hg<<" "<<mid<<" "<<hg-lw<<endl;
    if(abs(dis2-dis)<e)
    {
      ans=dis2;
      lw=mid+e;
    }

    if((dis2-dis)>0)
    {
      lw=mid+e;
    }

    else
    {
      hg=mid-e;
    }

    //break;
   }
   cout<<fixed<<setprecision(10)<<ans<<endl;

}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 srand(time(0));
 int t=1;
 cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=1e9+7;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);

const int N=2e5+5;

void solve()
{
   int n;
   long double l;
   cin>>n>>l;
   long double a[n+1];
   for(int i=1;i<=n;i++)
   {
    cin>>a[i];
   }
   long double lw=0,hg=l,e=1e-10,ans=-1;
   while((hg-lw)>e)
   {
    long double mid=(lw+hg)/2.0,dis=0,last=0,sp=1,dis2=0;
    sp=1;
    //mid=5;
    for(int i=1;i<=n;i++)
    {
      if(a[i]<=mid)
      {
        dis+=((a[i]-last)/sp);
        last=a[i];
        sp++;
      }
    }
    dis+=(mid-last)/sp;

    last=l;
    sp=1;
    for(int i=n;i>=1;i--)
    {
      if(a[i]>=mid)
      {
        dis2+=((last-a[i])/sp);
        last=a[i];
        sp++;
      }
    }
    dis2+=(last-mid)/sp;
    //cout<<dis<<" "<<dis2<<" "<<lw<<" "<<hg<<" "<<mid<<" "<<hg-lw<<endl;
    if(abs(dis2-dis)<e)
    {
      ans=dis2;
      lw=mid+e;
    }
    else if((dis2-dis)>0)
    {
      lw=mid+e;
    }

    else
    {
      hg=mid-e;
    }

    //break;
   }
   cout<<fixed<<setprecision(9)<<ans<<endl;

}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 srand(time(0));
 int t=1;
 cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=1e9+7;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);

const int N=2e5+5;

void solve()
{
   int n;
   long double l;
   cin>>n>>l;
   long double a[n+1];
   for(int i=1;i<=n;i++)
   {
    cin>>a[i];
   }
   long double lw=0,hg=l,e=1e-15,ans=-1;
   while((hg-lw)>e)
   {
    long double mid=(lw+hg)/2.0,dis=0,last=0,sp=1,dis2=0;
    sp=1;
    //mid=5;
    for(int i=1;i<=n;i++)
    {
      if(a[i]<=mid)
      {
        dis+=((a[i]-last)/sp);
        last=a[i];
        sp++;
      }
    }
    dis+=(mid-last)/sp;

    last=l;
    sp=1;
    for(int i=n;i>=1;i--)
    {
      if(a[i]>=mid)
      {
        dis2+=((last-a[i])/sp);
        last=a[i];
        sp++;
      }
    }
    dis2+=(last-mid)/sp;
    //cout<<dis<<" "<<dis2<<" "<<lw<<" "<<hg<<" "<<mid<<" "<<hg-lw<<endl;
    if(abs(dis2-dis)<e)
    {
      ans=dis2;
      lw=mid+e;
    }

    if((dis2-dis)>0)
    {
      lw=mid+e;
    }

    else
    {
      hg=mid-e;
    }

    //break;
   }
   cout<<fixed<<setprecision(15)<<ans<<endl;

}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 srand(time(0));
 int t=1;
 cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=1e9+7;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);

const int N=2e5+5;

void solve()
{
   int n;
   long double l;
   cin>>n>>l;
   long double a[n+1];
   for(int i=1;i<=n;i++)
   {
    cin>>a[i];
   }
   long double lw=0,hg=l,e=1e-10,ans=-1;
   while((hg-lw)>e)
   {
    long double mid=(lw+hg)/2.0,dis=0,last=0,sp=1,dis2=0;
    sp=1;
    //mid=5;
    for(int i=1;i<=n;i++)
    {
      if(a[i]<=mid)
      {
        dis+=((a[i]-last)/sp);
        last=a[i];
        sp++;
      }
    }
    dis+=(mid-last)/sp;

    last=l;
    sp=1;
    for(int i=n;i>=1;i--)
    {
      if(a[i]>=mid)
      {
        dis2+=((last-a[i])/sp);
        last=a[i];
        sp++;
      }
    }
    dis2+=(last-mid)/sp;
    //cout<<dis<<" "<<dis2<<" "<<lw<<" "<<hg<<" "<<mid<<" "<<hg-lw<<endl;
    if(abs(dis2-dis)<e)
    {
      ans=dis2;
      lw=mid+e;
    }
    if((dis2-dis)>0)
    {
      ans=dis2;
      lw=mid+e;
    }

    else
    {
      hg=mid-e;
    }

    //break;
   }
   cout<<fixed<<setprecision(15)<<ans<<endl;

}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 srand(time(0));
 int t=1;
 cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}

/*

1
9 1000000000
1 10 25 33 239 445 453 468 477

*/


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=1e9+7;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);

const int N=2e5+5;

void solve()
{
   int n;
   long double l;
   cin>>n>>l;
   long double a[n+1];
   for(int i=1;i<=n;i++)
   {
    cin>>a[i];
   }
   long double lw=0,hg=l,e=1e-11,ans=-1;
   while((hg-lw)>e)
   {
    long double mid=(lw+hg)/2.0,dis=0,last=0,sp=1,dis2=0;
    sp=1;
    //mid=5;
    for(int i=1;i<=n;i++)
    {
      if(a[i]<=mid)
      {
        dis+=((a[i]-last)/sp);
        last=a[i];
        sp++;
      }
    }
    dis+=(mid-last)/sp;

    last=l;
    sp=1;
    for(int i=n;i>=1;i--)
    {
      if(a[i]>=mid)
      {
        dis2+=((last-a[i])/sp);
        last=a[i];
        sp++;
      }
    }
    dis2+=(last-mid)/sp;
    //cout<<dis<<" "<<dis2<<" "<<lw<<" "<<hg<<" "<<mid<<" "<<hg-lw<<endl;
    if(abs(dis2-dis)<e)
    {
      ans=dis2;
      lw=mid+e;
    }

    if((dis2-dis)>0)
    {
      lw=mid+e;
    }

    else
    {
      hg=mid-e;
    }

    //break;
   }
   cout<<fixed<<setprecision(15)<<ans<<endl;

}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 srand(time(0));
 int t=1;
 cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=1e9+7;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);

const int N=2e5+5;

void solve()
{
   int  n,l;
   cin>>n>>l;
   long double a[n+1];
   for(int i=1;i<=n;i++)
   {
    cin>>a[i];
   }
   long double lw=0,hg=l,e=1e-10,ans=-1;
   while((hg-lw)>e)
   {
    long double mid=(lw+hg)/2.0,dis=0,last=0,sp=1,dis2=0;
    sp=1;
    //mid=5;
    for(int i=1;i<=n;i++)
    {
      if(a[i]<=mid)
      {
        dis+=((a[i]-last)/sp);
        last=a[i];
        sp++;
      }
    }
    dis+=(mid-last)/sp;

    last=l;
    sp=1;
    for(int i=n;i>=1;i--)
    {
      if(a[i]>=mid)
      {
        dis2+=((last-a[i])/sp);
        last=a[i];
        sp++;
      }
    }
    dis2+=(last-mid)/sp;
    //cout<<dis<<" "<<dis2<<" "<<lw<<" "<<hg<<" "<<mid<<" "<<hg-lw<<endl;
    if(abs(dis2-dis)<e)
    {
      ans=dis2;
      break;
    }
    else if((dis2-dis)>0)
    {
      lw=mid+e;
    }

    else
    {
      hg=mid-e;
    }

    //break;
   }
   cout<<fixed<<setprecision(9)<<ans<<endl;

}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 srand(time(0));
 int t=1;
 cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}


#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define int long long
#define ar array<int,2>
#define inf 1000000000000000000
#define deb(x) cerr << "\n" << (#x) << " is " << (x) << endl
int mod=1e9+7;
int min(int a,int b){return (a<b)?a:b;}
int max(int a,int b){return (a>b)?a:b;}
int fp(int a,int b){if(b==0) return 1;int x=fp(a,b/2);x=(x*x)%mod;if(b&1) x=(x*a)%mod;return x;}
auto random_add = [] { char *p = new char; delete p; return uint64_t(p); };
const uint64_t SEED = chrono::steady_clock::now().time_since_epoch().count() * (random_add() | 1);
mt19937_64 rng(SEED);

const int N=2e5+5;

void solve()
{
   int n;
   long double l;
   cin>>n>>l;
   long double a[n+1];
   for(int i=1;i<=n;i++)
   {
    cin>>a[i];
   }
   long double lw=0,hg=l,e=1e-10,ans=-1;
   while((hg-lw)>e)
   {
    long double mid=(lw+hg)/2.0,dis=0,last=0,sp=1,dis2=0;
    sp=1;
    //mid=5;
    for(int i=1;i<=n;i++)
    {
      if(a[i]<=mid)
      {
        dis+=((a[i]-last)/sp);
        last=a[i];
        sp++;
      }
    }
    dis+=(mid-last)/sp;

    last=l;
    sp=1;
    for(int i=n;i>=1;i--)
    {
      if(a[i]>=mid)
      {
        dis2+=((last-a[i])/sp);
        last=a[i];
        sp++;
      }
    }
    dis2+=(last-mid)/sp;
    //cout<<dis<<" "<<dis2<<" "<<lw<<" "<<hg<<" "<<mid<<" "<<hg-lw<<endl;
    if(abs(dis2-dis)<e)
    {
      ans=dis2;
      lw=mid+e;
    }

    if((dis2-dis)>0)
    {
      lw=mid+e;
    }

    else
    {
      hg=mid-e;
    }

    //break;
   }
   cout<<fixed<<setprecision(15)<<ans<<endl;

}

signed main() {
 ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
 srand(time(0));
 int t=1;
 cin>>t;
 for(int i=1;i<=t;i++)
 {
   solve();
 }
}


#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
#define clr(x) memset(x, 0, sizeof(x))
#define all(a) a.begin(),a.end()
#define forn(i, a,b) for(int i = int(a); i < int(b); ++i)
#define forn_r(i, b, a) for(int i = int(b); i > int(a); i--)
#define trav(a,x) for (auto& a : x)
#define printArray(array, length) for(int i = 0; i < length; i++) cout<< array[i] << (i == length - 1 ? '\n' : ' ');
#define print(x) cout << x << '\n'
#define print2(x, y) cout << x << ' ' << y << '\n'
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
template<class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

using namespace std;
typedef long long ll;
const int INF = INT_MAX;
const ll LNF  = LONG_LONG_MAX;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline ll  gcd(ll  a, ll  b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t =1;
    cin>>t;
    while(t--){
    	ll n,p;
  		cin>>n>>p;
  		ll a[n];
  		forn(i,0,n) cin>>a[i];
  		ll l=0,r=n-1;
  		double distl=0,distr=0;
  		int speedl=1,speedr=1;
  		double timeL=0, timeR=0,tempL=0,tempR=0;
  		double distL=0,distR=p;
  		cout << std::fixed << std::showpoint;
   		cout << std::setprecision(10);

  		bool work=0;
  		while(l<=r){
  			// debug2(tempL,tempR);
  			// debug2(speedl,speedr);
  			// debug2(distL,distR);
  			tempL=(a[l]-distL)/speedl;

  			tempR=(distR-a[r])/speedr;

  			if(tempL==tempR){
  				l++,r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;

  				// if(distL>=distR){
  					// double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					// double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					// print(timeL+time);
  					// work=1;
  					// break;
  				// }
  				speedr++;
  				timeR+=tempR;
  				speedl++;
  				timeL+=tempL;
  			}
  			else if(tempL>tempR){
  				r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				// if(distL>=distR){
  					// double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					// double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					// print(timeL+time);
  					// work=1;
  					// break;
  				// }
  				speedr++;
  				timeR+=tempR;
  				timeL+=tempR;
  			}
  			else{
  				l++;
  				distL+=tempL*speedl;
  				distR-=tempL*speedr;

  				// if(distL>=distR){
  					// double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					// double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					// print(timeL+time);
  					// work=1;
  					// break;
  				// }
  				speedl++;
  				timeL+=tempL;
  				timeR+=tempL;
  			}

  		}
  		if(!work){
  			double oL =distL,oR=distR;
			double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
			print(timeL+time);

  		}

    }
    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
#define clr(x) memset(x, 0, sizeof(x))
#define all(a) a.begin(),a.end()
#define forn(i, a,b) for(int i = int(a); i < int(b); ++i)
#define forn_r(i, b, a) for(int i = int(b); i > int(a); i--)
#define trav(a,x) for (auto& a : x)
#define printArray(array, length) for(int i = 0; i < length; i++) cout<< array[i] << (i == length - 1 ? '\n' : ' ');
#define print(x) cout << x << '\n'
#define print2(x, y) cout << x << ' ' << y << '\n'
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
template<class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

using namespace std;
typedef long long ll;
const int INF = INT_MAX;
const ll LNF  = LONG_LONG_MAX;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline ll  gcd(ll  a, ll  b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t =1;
    cin>>t;
    while(t--){
    	ll n,p;
  		cin>>n>>p;
  		ll a[n];
  		forn(i,0,n) cin>>a[i];
  		ll l=0,r=n-1;
  		double distl=0,distr=0;
  		int speedl=1,speedr=1;
  		double timeL=0, timeR=0,tempL=0,tempR=0;
  		double distL=0,distR=p;
  		cout << std::fixed << std::showpoint;
   		cout << std::setprecision(10);

  		bool work=0;
  		while(l<n && r>=0&& distL<=distR){
  			// debug2(tempL,tempR);
  			// debug2(speedl,speedr);
  			// debug2(distL,distR);
  			tempL=(a[l]-distL)/speedl;

  			tempR=(distR-a[r])/speedr;

  			if(tempL==tempR){
  				l++,r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				speedl++;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;

  				timeL+=tempL;
  			}
  			else if(tempL>tempR){
  				r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				timeL+=tempR;
  			}
  			else{
  				l++;
  				distL+=tempL*speedl;
  				distR-=tempL*speedr;
  				speedl++;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}

  				timeL+=tempL;
  				timeR+=tempL;
  			}

  		}
  		if(!work){
  			double oL =distL,oR=distR;
			double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
			print(timeL+time);

  		}

    }
    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
#define clr(x) memset(x, 0, sizeof(x))
#define all(a) a.begin(),a.end()
#define forn(i, a,b) for(int i = int(a); i < int(b); ++i)
#define forn_r(i, b, a) for(int i = int(b); i > int(a); i--)
#define trav(a,x) for (auto& a : x)
#define printArray(array, length) for(int i = 0; i < length; i++) cout<< array[i] << (i == length - 1 ? '\n' : ' ');
#define print(x) cout << x << '\n'
#define print2(x, y) cout << x << ' ' << y << '\n'
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
template<class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

using namespace std;
typedef long long ll;
const int INF = INT_MAX;
const ll LNF  = LONG_LONG_MAX;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline ll  gcd(ll  a, ll  b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t =1;
    cin>>t;
    while(t--){
    	ll n,p;
  		cin>>n>>p;
  		ll a[n];
  		forn(i,0,n) cin>>a[i];
  		ll l=0,r=n-1;
  		double distl=0,distr=0;
  		int speedl=1,speedr=1;
  		double timeL=0, timeR=0,tempL=0,tempR=0;
  		double distL=0,distR=p;
  		cout << std::fixed << std::showpoint;
   		cout << std::setprecision(10);

  		bool work=0;
  		while(l<n && r>=0&& distL<distR){
  			// debug2(tempL,tempR);
  			// debug2(speedl,speedr);
  			// debug2(distL,distR);
  			tempL=(a[l]-distL)/speedl;

  			tempR=(distR-a[r])/speedr;

  			if(tempL==tempR){
  				l++,r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				speedl++;
  				timeL+=tempL;
  			}
  			else if(tempL>tempR){
  				r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				timeL+=tempR;
  			}
  			else{
  				l++;
  				distL+=tempL*speedl;
  				distR-=tempL*speedr;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedl++;
  				timeL+=tempL;
  				timeR+=tempL;
  			}

  		}
  		if(!work){
  			double oL =distL,oR=distR;
			double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
			print(timeL+time);

  		}

    }
    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
#define clr(x) memset(x, 0, sizeof(x))
#define all(a) a.begin(),a.end()
#define forn(i, a,b) for(int i = int(a); i < int(b); ++i)
#define forn_r(i, b, a) for(int i = int(b); i > int(a); i--)
#define trav(a,x) for (auto& a : x)
#define printArray(array, length) for(int i = 0; i < length; i++) cout<< array[i] << (i == length - 1 ? '\n' : ' ');
#define print(x) cout << x << '\n'
#define print2(x, y) cout << x << ' ' << y << '\n'
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
template<class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

using namespace std;
typedef long long ll;
const int INF = INT_MAX;
const ll LNF  = LONG_LONG_MAX;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline ll  gcd(ll  a, ll  b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t =1;
    cin>>t;
    while(t--){
    	ll n,p;
  		cin>>n>>p;
  		ll a[n];
  		forn(i,0,n) cin>>a[i];
  		ll l=0,r=n-1;
  		double distl=0,distr=0;
  		int speedl=1,speedr=1;
  		double timeL=0, timeR=0,tempL=0,tempR=0;
  		double distL=0,distR=p;
  		cout << std::fixed << std::showpoint;
   		cout << std::setprecision(20);

  		bool work=0;
  		while(l<n && r>=0&& distL<distR){
  			// debug2(tempL,tempR);
  			// debug2(speedl,speedr);
  			// debug2(distL,distR);
  			tempL=(a[l]-distL)/speedl;

  			tempR=(distR-a[r])/speedr;

  			if(tempL==tempR){
  				l++,r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				speedl++;
  				timeL+=tempL;
  			}
  			else if(tempL>tempR){
  				r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				timeL+=tempR;
  			}
  			else{
  				l++;
  				distL+=tempL*speedl;
  				distR-=tempL*speedr;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedl++;
  				timeL+=tempL;
  				timeR+=tempL;
  			}

  		}
  		if(!work){
  			double oL =distL,oR=distR;
			double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
			print(timeL+time);

  		}

    }
    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
#define clr(x) memset(x, 0, sizeof(x))
#define all(a) a.begin(),a.end()
#define forn(i, a,b) for(int i = int(a); i < int(b); ++i)
#define forn_r(i, b, a) for(int i = int(b); i > int(a); i--)
#define trav(a,x) for (auto& a : x)
#define printArray(array, length) for(int i = 0; i < length; i++) cout<< array[i] << (i == length - 1 ? '\n' : ' ');
#define print(x) cout << x << '\n'
#define print2(x, y) cout << x << ' ' << y << '\n'
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
template<class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

using namespace std;
typedef long long ll;
const int INF = INT_MAX;
const ll LNF  = LONG_LONG_MAX;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline ll  gcd(ll  a, ll  b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t =1;
    cin>>t;
    while(t--){
    	ll n,p;
  		cin>>n>>p;
  		ll a[n];
  		forn(i,0,n) cin>>a[i];
  		ll l=0,r=n-1;
  		double distl=0,distr=0;
  		int speedl=1,speedr=1;
  		double timeL=0, timeR=0,tempL=0,tempR=0;
  		double distL=0,distR=p;
  		cout << fixed;

  		bool work=0;
  		while(l<n && r>=0&& distL<distR){
  			// debug2(tempL,tempR);
  			// debug2(speedl,speedr);
  			// debug2(distL,distR);
  			tempL=(a[l]-distL)/speedl;

  			tempR=(distR-a[r])/speedr;

  			if(tempL==tempR){
  				l++,r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				speedl++;
  				timeL+=tempL;
  			}
  			else if(tempL>tempR){
  				r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				timeL+=tempR;
  			}
  			else{
  				l++;
  				distL+=tempL*speedl;
  				distR-=tempL*speedr;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedl++;
  				timeL+=tempL;
  				timeR+=tempL;
  			}

  		}
  		if(!work){
  			double oL =distL,oR=distR;
			double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
			print(timeL+time);

  		}

    }
    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
#define clr(x) memset(x, 0, sizeof(x))
#define all(a) a.begin(),a.end()
#define forn(i, a,b) for(int i = int(a); i < int(b); ++i)
#define forn_r(i, b, a) for(int i = int(b); i > int(a); i--)
#define trav(a,x) for (auto& a : x)
#define printArray(array, length) for(int i = 0; i < length; i++) cout<< array[i] << (i == length - 1 ? '\n' : ' ');
#define print(x) cout << x << '\n'
#define print2(x, y) cout << x << ' ' << y << '\n'
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
template<class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

using namespace std;
typedef long long ll;
const int INF = INT_MAX;
const ll LNF  = LONG_LONG_MAX;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline ll  gcd(ll  a, ll  b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t =1;
    cin>>t;
    while(t--){
    	ll n,p;
  		cin>>n>>p;
  		ll a[n];
  		forn(i,0,n) cin>>a[i];
  		ll l=0,r=n-1;
  		double distl=0,distr=0;
  		int speedl=1,speedr=1;
  		double timeL=0, timeR=0,tempL=0,tempR=0;
  		double distL=0,distR=p;
  		cout << std::fixed << std::showpoint;
   		cout << std::setprecision(10);

  		bool work=0;
  		while(l<n && r>=0&& distL<=distR){
  			// debug2(tempL,tempR);
  			// debug2(speedl,speedr);
  			// debug2(distL,distR);
  			tempL=(a[l]-distL)/speedl;

  			tempR=(distR-a[r])/speedr;

  			if(tempL==tempR){
  				l++,r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				speedl++;
  				timeL+=tempL;
  			}
  			else if(tempL>tempR){
  				r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				timeL+=tempR;
  			}
  			else{
  				l++;
  				distL+=tempL*speedl;
  				distR-=tempL*speedr;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedl++;
  				timeL+=tempL;
  				timeR+=tempL;
  			}

  		}
  		if(!work){
  			double oL =distL,oR=distR;
			double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
			print(timeL+time);

  		}

    }
    return 0;
}


#include<bits/stdc++.h>
#define pb push_back
#define pf push_front
#define clr(x) memset(x, 0, sizeof(x))
#define all(a) a.begin(),a.end()
#define forn(i, a,b) for(int i = int(a); i < int(b); ++i)
#define forn_r(i, b, a) for(int i = int(b); i > int(a); i--)
#define trav(a,x) for (auto& a : x)
#define printArray(array, length) for(int i = 0; i < length; i++) cout<< array[i] << (i == length - 1 ? '\n' : ' ');
#define print(x) cout << x << '\n'
#define print2(x, y) cout << x << ' ' << y << '\n'
#define debug(x) cout << #x << "=" << x << endl
#define debug2(x, y) cout << #x << "=" << x << "," << #y << "=" << y << endl
template<class T> bool chmin(T& a, const T& b) { return b < a ? a = b, 1 : 0; }
template<class T> bool chmax(T& a, const T& b) { return a < b ? a = b, 1 : 0; }

using namespace std;
typedef long long ll;
const int INF = INT_MAX;
const ll LNF  = LONG_LONG_MAX;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
inline ll  gcd(ll  a, ll  b) { return b ? gcd(b, a % b) : a; }
inline int lcm(int a, int b) { return a * b / gcd(a, b); }

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int t =1;
    cin>>t;
    while(t--){
    	ll n,p;
  		cin>>n>>p;
  		ll a[n];
  		forn(i,0,n) cin>>a[i];
  		ll l=0,r=n-1;
  		double distl=0,distr=0;
  		int speedl=1,speedr=1;
  		double timeL=0, timeR=0,tempL=0,tempR=0;
  		double distL=0,distR=p;
  		cout << std::fixed << std::showpoint;
   		cout << std::setprecision(10);

  		bool work=0;
  		while(l<n && r>=0&& distL<=distR){
  			// debug2(tempL,tempR);
  			// debug2(speedl,speedr);
  			// debug2(distL,distR);
  			tempL=(a[l]-distL)/speedl;

  			tempR=(distR-a[r])/speedr;

  			if(tempL==tempR){
  				l++,r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;

  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				speedl++;
  				timeL+=tempL;
  			}
  			else if(tempL>tempR){
  				r--;
  				distR-=tempR*speedr;
  				distL+=tempR*speedl;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}
  				speedr++;
  				timeR+=tempR;
  				timeL+=tempR;
  			}
  			else{
  				l++;
  				distL+=tempL*speedl;
  				distR-=tempL*speedr;
  				speedl++;
  				if(distL>=distR){
  					double oL =distL-tempL*speedl,oR=distR+tempL*speedr;
  					double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
  					print(timeL+time);
  					work=1;
  					break;
  				}

  				timeL+=tempL;
  				timeR+=tempL;
  			}

  		}
  		if(!work){
  			double oL =distL,oR=distR;
			double time =((oR-oL)*speedl/(speedl+speedr))/speedl;
			print(timeL+time);

  		}

    }
    return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define int long long int

main()
{
	int te;
	cin>>te;
	while(te--)
	{
		int n,len;
		cin>>n>>len;
	float a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
int l=0,r=n-1;
float curl=0,curr=len;
float speedl=1,speedr=1;
 float time=0;
	while(l<=r)
	{

		if((a[l]-curl)/speedl<(curr-a[r])/speedr)
		{

		time+=	(a[l]-curl)/speedl;
		curr-=speedr*((a[l]-curl)/speedl);
				curl=a[l];
				speedl++;
			l++;

		}
		else
		{

		time+=((curr-a[r])/speedr);
		curl+=speedl*(((curr-a[r])/speedr));
				curr=a[r];
				speedr++;
			r--;

		}
	}
	time+=(curr-curl)/(speedl+speedr);
	printf("%0.10000000f",time);
	cout<<endl
//std::cout << std::setprecision(100) << time<< '\n';
	;}
}


#include<bits/stdc++.h>
using namespace std;
main()
{
	int te;
	cin>>te;
	while(te--)
	{
		int n,len;
		cin>>n>>len;
	int a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
int l=0,r=n-1;
float curl=0,curr=len;
float speedl=1,speedr=1;
float time=0;
	while(l<=r)
	{

		if((a[l]-curl)/speedl<(curr-a[r])/speedr)
		{

		time+=	(a[l]-curl)/speedl;
		curr-=speedr*((a[l]-curl)/speedl);
				curl=a[l];
				speedl++;
			l++;

		}
		else
		{

		time+=((curr-a[r])/speedr);
		curl+=speedl*(((curr-a[r])/speedr));
				curr=a[r];
				speedr++;
			r--;

		}
	}
	time+=(curr-curl)/(speedl+speedr);
	cout<<time<<endl;
	}
}


#include<bits/stdc++.h>
using namespace std;
#define float float

main()
{
	int te;
	cin>>te;
	while(te--)
	{
		int n,len;
		cin>>n>>len;
	int a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
int l=0,r=n-1;
float curl=0,curr=len;
float speedl=1,speedr=1;
float time=0;
	while(l<=r)
	{

		if((a[l]-curl)/speedl<(curr-a[r])/speedr)
		{

		time+=	(a[l]-curl)/speedl;
		curr-=speedr*((a[l]-curl)/speedl);
				curl=a[l];
				speedl++;
			l++;

		}
		else
		{

		time+=((curr-a[r])/speedr);
		curl+=speedl*(((curr-a[r])/speedr));
				curr=a[r];
				speedr++;
			r--;

		}
	}
	time+=(curr-curl)/(speedl+speedr);
std::cout << std::setprecision(100) << time<< '\n';
	}
}


#include<bits/stdc++.h>
using namespace std;
#define int long long int

main()
{
	int te;
	cin>>te;
	while(te--)
	{
		int n,len;
		cin>>n>>len;
	float a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
int l=0,r=n-1;
float curl=0,curr=len;
float speedl=1,speedr=1;
 float time=0;
	while(l<=r)
	{

		if((a[l]-curl)/speedl<(curr-a[r])/speedr)
		{

		time+=	(a[l]-curl)/speedl;
		curr-=speedr*((a[l]-curl)/speedl);
				curl=a[l];
				speedl++;
			l++;

		}
		else
		{

		time+=((curr-a[r])/speedr);
		curl+=speedl*(((curr-a[r])/speedr));
				curr=a[r];
				speedr++;
			r--;

		}
	}
	time+=(curr-curl)/(speedl+speedr);
	printf("%0.30f",time);
	cout<<endl
//std::cout << std::setprecision(100) << time<< '\n';
	;}
}


#include<bits/stdc++.h>
using namespace std;
#define float float

main()
{
	int te;
	cin>>te;
	while(te--)
	{
		int n,len;
		cin>>n>>len;
	int a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
int l=0,r=n-1;
float curl=0,curr=len;
float speedl=1,speedr=1;
float time=0;
	while(l<=r)
	{

		if((a[l]-curl)/speedl<(curr-a[r])/speedr)
		{

		time+=	(a[l]-curl)/speedl;
		curr-=speedr*((a[l]-curl)/speedl);
				curl=a[l];
				speedl++;
			l++;

		}
		else
		{

		time+=((curr-a[r])/speedr);
		curl+=speedl*(((curr-a[r])/speedr));
				curr=a[r];
				speedr++;
			r--;

		}
	}
	time+=(curr-curl)/(speedl+speedr);
std::cout << std::setprecision(24) << time<< '\n';
	}
}


#include<bits/stdc++.h>
using namespace std;
//#define long double float
#define float long double

main()
{
	int te;
	cin>>te;
	while(te--)
	{
		int n,len;
		cin>>n>>len;
	float a[n];
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
int l=0,r=n-1;
float curl=0,curr=len;
float speedl=1,speedr=1;
 float time=0;
	while(l<=r)
	{

		if((a[l]-curl)/speedl<(curr-a[r])/speedr)
		{

		time+=	(a[l]-curl)/speedl;
		curr-=speedr*((a[l]-curl)/speedl);
				curl=a[l];
				speedl++;
			l++;

		}
		else
		{

		time+=((curr-a[r])/speedr);
		curl+=speedl*(((curr-a[r])/speedr));
				curr=a[r];
				speedr++;
			r--;

		}
	}
	time+=(curr-curl)/(speedl+speedr);
	//cout<<time;
//	printf("%0.6f",time);
//	cout<<endl
std::cout << std::setprecision(100) << time<< '\n';
	;}
}


#include<bits/stdc++.h>
#define pi 3.141592653589793238
#pragma GCC target ("avx2")
#pragma GCC optimization ("O3")
#pragma GCC optimization ("unroll-loops")
#define MOD 1000000007
#define INF 999999999999999999
#define pb push_back
#define ff first
#define ss second

#define mt make_tuple
#define ll long long
#define fast ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
using namespace std;
#include <ext/pb_ds/assoc_container.hpp>

using namespace __gnu_pbds;

typedef tree<ll, null_type, less_equal<ll>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    fast;
    ll T = 1, i, j;

    cin >> T;
    while (T--) {
        ll n;
        double l;
        cin >> n >> l;
        vector<double> v(n + 1);
        for(i = 1; i <= n; i++){
            cin >> v[i];
            //v[i] *= 10000000;
        }
        ///l = l * 10000000;
        v.pb(l);
        double lo = 0, hi = 1000000000;
        double ans;
        while(lo + 0.000001 <= hi){

            double mid = (lo + hi) / 2;
            double sp = 1;
            double time = 0;
            double posleft = l, posright = 0;
            double pos = 0;
            for(i = 1; i <= n + 1; i++){

                double add = (v[i] - pos) / sp;
                if(time + add >= mid){
                    posleft = pos + sp * (mid - time);
                    break;
                }
                time += add;
                pos = v[i];
                sp += 1;
            }

            pos = l, sp = 1;
            time = 0;
            for(i = n ; i >= 0; i--){
                double add = (pos - v[i]) / sp;
                if(time + add >= mid){
                    posright = pos - sp * (mid - time);
                    break;
                }
                time += add;
                pos = v[i];
                sp += 1;
            }

            //cout << lo << " " << hi << " " << posleft << " " << posright << endl;
            if(posleft  > posright){
                hi = mid;
            }
            else{
                ans = mid;
                lo = mid;
            }
        }
        cout << endl;
        //ans = ans / 10000000;
        cout << fixed << setprecision(10) << ans + 0.000001 << endl;
    }
    return 0;
}