#include <bits/stdc++.h>
using namespace std;
#define _ ios_base::sync_with_stdio(0); cin.tie(0);
#define endl '\n'
#define f first
#define s second
#define pb push_back
#define re resize
const int maxn = 1e5+10;
typedef unsigned long long ull;
typedef long long ll;
typedef long double ld;
ll n,m,q,k;
vector<ll> v;
int main() { _
cin >> n;
priority_queue<ld, vector<ld>, greater<>> pq;
for(int i=0; i<n; i++){
ld x;
cin >> x;
pq.push(x);
}
double ans = 0;
while(pq.size()>1){
ld t = pq.top();
pq.pop();
ld t2 = pq.top();
pq.pop();
ld nt = (t+t2)/2;
pq.push(nt);
//cout << "nota 1 = "<<t<<endl<<"nota 2 = "<<t2<<endl<<"nova nota = "<<nt<<endl<<endl;
}
cout << fixed<<setprecision(6)<<pq.top()<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |