FilterReset
Username

Prob
	Result 
	Time
(ms)	Mem
(MB)	Lang 
	Submit Time
1443425302
H
Runtime Error
Bash (GNU bash v4.3.11)
21 hr ago
1443425302
H
Wrong Answer
C++
21 hr ago
           
All Copyright Reserved © 2010-2019 Xu Han
Server Time: 2019-11-20 14:15:59 CST

#22948967 | 1443425302's solution for [Problem H]
Status
Wrong Answer
Length
445
Lang
C++14 (GCC 5.3.0)
Submitted
2019-11-19 17:27:07
Shared

6.0 / 13.0
Select Code
#include<iostream>
#include<queue>
using namespace std;
int main()
{
	priority_queue<double,vector<double>,greater<double> > a;
	int n,m;
	while(cin>>n)
	{
		for(int i=0;i<n;i++)
		{
			cin>>m;
			a.push(m);
		}
		for(int i=1;i<n;i++)
		{
			double temp1,temp2;
			double temp3;
			temp1=a.top();
			a.pop();
			temp2=a.top();
			a.pop();
			temp3=(double)(temp1+temp2)/2.0;
			a.push(temp3);
		}
		cout<<a.top()<<endl;
		a.pop();
	}
	
	return 0;
}