#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cmath>
#include <cassert>
using namespace std;
typedef bool (*comp)(double);
int n;
double eps = 1E-10, 
	pi = acos(-1.0),
	dpi = pi * 2.0,
	lengths[110], 
	perimeter = 0.0, 
	maxEdge = 0.0;


bool eq(double a, double b)
{
	return fabs(a - b) <= eps;
}


double get_angle(double l, double r)
{
	return acos(1.0 - l * l / (2.0 * r * r));
}

double get_square(double r)
{
	double res = 0.0;
	for(int i = 0; i < n; i++)
		res += sqrt(r * r - lengths[i] * lengths[i] / 4.0) * lengths[i] / 2.0;
	return res;
}

int getType(double maxEdge)
{
	double angle = 0.0, r = maxEdge / 2.0;
	for(int i = 0; i < n; i++)
		angle += get_angle(lengths[i], r);
	
	if(eq(angle, 2 * pi) || angle > 2 * pi)
		return 1;

	return 2;
}

bool is_large_type_1(double r)
{
	if(eq(2.0 * pi * r, perimeter) || 2.0 * pi * r < perimeter)
		return false;

	double angle = 0.0;
	for(int i = 0; i < n; i++)
	{
		angle += get_angle(lengths[i], r);
		if(eq(angle, 2.0 * pi) || angle > 2.0 * pi)
			return false;
	}
	return true;
}

bool is_large_type_2(double r)
{
	double angle = 0.0, maxAngle = get_angle(maxEdge, r) * 2.0;
	for(int i = 0; i < n; i++)
		angle += get_angle(lengths[i], r);

	return eq(angle, maxAngle) || angle > maxAngle;
}

double find_radius(comp func)
{
	double l = 0.0, r = 1000000.0, m;
	for(int i = 0; i < n; i++)
		l = max(l, lengths[i] / 2.0);
	while(fabs(r - l) > eps)
	{
		m = (l + r) / 2.0;
		if(func(m)) r = m;
		else l = m;
	}
	return (l + r) / 2.0;
}

double solve()
{
	int i;
	double r, square = 0.0;
	perimeter = maxEdge = 0;
	for(i = 0; i < n; i++)
	{
		perimeter += lengths[i];
		maxEdge = max(maxEdge, lengths[i]);
	}

	if(perimeter - maxEdge > maxEdge)
	{
		if(getType(maxEdge) == 1)
		{
			r = find_radius(&is_large_type_1);
			square = get_square(r);
		}
		else
		{
			r = find_radius(&is_large_type_2);
			square = get_square(r) - sqrt(r * r - maxEdge * maxEdge / 4.0) * maxEdge;
		}
	}
	return square;
}

int main()
{
	freopen("fence.in", "r", stdin);
	//freopen("fence.out", "w", stdout);

	int i, test;
	scanf("%d", &test);
	assert(test > 0);
	while(test > 0)
	{
		scanf("%d", &n);
		assert(n >= 3 && n <= 100);
		for(i = 0; i < n; i++)
		{
			scanf("%lf", &lengths[i]);
			assert(lengths[i] >= 1.0 && lengths[i] <= 100.0);
		}
		printf("%.2lf\n", solve());
		test--;
	}
	return 0;
}