2932021-08-20 14:21:50Babják PéterÁdám és Éva közül legalább az egyikcpp11Wrong answer 0/40492ms4972 KiB
#include <bits/stdc++.h>
using namespace std;
int main()
{
	int t;
	cin>>t;
	while(t--)
	{
		int n,sum=0;
		cin>>n;
		vector<int>d(n);
		for(int i=0;i<n;i++)
		{
			cin>>d[i];
		}
		sort(d.begin(),d.end());
		for(int i=0;i<n-1;i++)
		{
			sum+=d[i];
		}
		long double v1=(long double)sum/(n-1);
		long double v2=(long double)d[n-1];
		long double v3=(long double)v2+v1;
		cout<<setprecision(16);
		cout<<(long double)v3<<endl;
	}
	return 0;
}

SubtaskSumTestVerdictTimeMemory
base0/40
1Wrong answer0/03ms1888 KiB
2Time limit exceeded0/0456ms1164 KiB
3Wrong answer0/21ms1940 KiB
4Wrong answer0/22ms1948 KiB
5Wrong answer0/22ms1948 KiB
6Wrong answer0/21ms1952 KiB
7Wrong answer0/22ms1960 KiB
8Wrong answer0/22ms1972 KiB
9Wrong answer0/22ms1964 KiB
10Wrong answer0/214ms1972 KiB
11Time limit exceeded0/2432ms1060 KiB
12Time limit exceeded0/2449ms1064 KiB
13Time limit exceeded0/2458ms1248 KiB
14Time limit exceeded0/2456ms1152 KiB
15Time limit exceeded0/2492ms2228 KiB
16Runtime error0/212ms2728 KiB
17Runtime error0/210ms3176 KiB
18Runtime error0/217ms3528 KiB
19Runtime error0/210ms3844 KiB
20Runtime error0/212ms4220 KiB
21Runtime error0/214ms4596 KiB
22Runtime error0/210ms4972 KiB