# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
49826 | A_H_Ghaznavi | Prosjek (COCI18_prosjek) | C++14 | 3 ms | 812 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.
// In the name of god
// A.H.Ghaznavi
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
int n,a[30];
ld ans[30];
int main()
{
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
cin>>n;
for (int i=0;i<n;i++)
cin>>a[i];
sort (a, a+n);
for (int i=0;i<n;i++)
ans[i]=a[i];
for (int i=0;i<n-1;i++)
ans[i+1]=(ans[i]+ans[i+1])/2;
cout.precision(10);
cout<<fixed<<ans[n-1];
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |