# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
470481 | rajn | Prosjek (COCI18_prosjek) | C++14 | 1 ms | 204 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
using namespace std;
#define int long long int
#define d long double
int32_t main()
{
int t;
cin>>t;
d a[t];
for(int i=0;i<t;i++)
{
cin>>a[i];
}
sort(a,a+t);
d avg=(a[0]+a[1])/2;
for(int i=2;i<t;i++)
{
avg=(avg+a[i])/2;
}
cout<<avg;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |