TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
v = [int(i) for i in input().split()]
v.sort()
ans = v[0]
print(v)
for i in range(1, len(v)):
    ans = (ans + v[i]) / 2
print(ans)


n = int(input())
v = [int(i) for i in input().split()]
v.sort()
ans = v[0]
for i in range(2, len(v)):
    ans = (ans + v[i]) / 2
print(ans)


n = int(input())
v = [int(i) for i in input().split()]
v.sort()
ans = (v[0] + v[1]) / 2
for i in range(2, len(v)):
    ans = (ans + v[i]) / 2
print(ans)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
T = list(map(int,input().split()))
S = 0
for i in range(len(T)):
    list.sort(T, reverse=False)
    S = (T[0]+T[1])/2
    print(T[0])
    print(T[1])
    T.append(S)    
    T.pop(0)
    T.pop(0)
    print(T)
    if len(T) ==1:break
    

N = int(input())
T = list(map(int,input().split()))
S = 0
for i in range(len(T)):
    list.sort(T, reverse=False)
    S = (T[0]+T[1])/2
    T.append(S)    
    T.pop(0)
    T.pop(0)
    
    if len(T) ==1:break
print(T[0])

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
n_list = list(map(int,input().split()))

n_list.sort()

new_list = []
ctr = 0

while len(n_list) > 1:
  n_list[ctr] = (n_list[ctr] + n_list[ctr+1])/2
  n_list.pop(ctr + 1)
  n_list.sort
  
print(n_list)

ソースコード
[0]
1
N = int(input())
2
n_list = list(map(int,input().split()))
3
​
4
n_list.sort()
5
​
6
new_list = []
7
ctr = 0
8
​
9
while len(n_list) > 1:
10
  n_list[ctr] = (n_list[ctr] + n_list[ctr+1])/2
11
  n_list.pop(ctr + 1)
12
  n_list.sort
13
  
14
print(n_list[0

N = int(input())
n_list = list(map(int,input().split()))

n_list.sort()

new_list = []
ctr = 0

while len(n_list) > 1:
  n_list[ctr] = (n_list[ctr] + n_list[ctr+1])/2
  n_list.pop(ctr + 1)
  n_list.sort
  
print(n_list[0])

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N=int(input())
V=list(map(int,input().split()))
V=sorted(V)
ans=V[0]
for i in range(1,N-1):
  ans=(ans+V[i])/2
print(ans)

N=int(input())
A=sorted(list(map(int,input().split())))
ans=A[0]
for i in range(1,N):
  ans=(ans+A[i])/2
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v = list(map(float,input().split()))
v.sort()
for i in range(0,100,2):
  v.append((v[i]+v[i+1])/2)
  v[i] = v[i+1] = 0
  v.sort()
  print(v)
  if v[-2] == 0:
    break
print(v[-1])


N = int(input())
v = list(map(float,input().split()))
v.sort()
for i in range(0,100,2):
  v.append((v[i]+v[i+1])/2)
  v[i] = v[i+1] = 0
  v.sort()
  if v[-2] == 0:
    break
print(v[-1])


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v = list(map(int, input().split()))

v_sorted = sorted(v)

out = 0
for i in range(N-1):
  out += v_sorted[i]*(1/2)^(N-1-i)

print(out+v_sorted[-1]*(1/2))

N = int(input())
v = list(map(int, input().split()))

v_s = sorted(v)

out = 0
for i in range(N):
  if i == 0:
    out += v_s[i]*((1/2)**(N-1))
  else:
    out += v_s[i]*((1/2)**(N-i))
  
print(out)

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
v = sorted(list(map(int, input().split(' '))))

print(v)

sum = v.pop(0)
for i in v:
    sum += i
    sum = sum/2

print(sum)

n = int(input())
v = sorted(list(map(int, input().split(' '))))

sum = v.pop(0)
for i in v:
    sum += i
    sum = sum/2

print(sum)

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())

v = list(map(int,input().split()))

v.sort(reverse = True)

while len(v) > 1 :
    v.append((v.pop(-1) + v.pop(-2))/2)
    v.sort(reverse = True)

print(v)


n = int(input())

v = list(map(int,input().split()))

v.sort(reverse = True)

while len(v) > 1 :
    v.append((v.pop(-1) + v.pop(-1))/2)
    v.sort(reverse = True)

print(v[0])


Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=int(input())
v=sorted(list(map(int,input().split())))
ans=v[0]
for i in range(1,n):
    ans=(ans+v[i])//2
print(ans)

n=int(input())
v=sorted(list(map(int,input().split())))
ans=v[0]
for i in range(n-1):
    ans=(ans+v[i+1])//2
print(ans)

n=int(input())
v=sorted(list(map(int,input().split())))
ans=v[0]
for i in range(n-1):
    ans=(ans+v[i+1])/2
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=int(input())
v=list(map(int, input().split()))
v.sort()
sum=v[0]
for i in range(1,len(v))
	sum=(sum+v[i])/2
print(sum)

n=int(input())
v=list(map(int, input().split()))
v.sort()
sum=v[0]
for i in range(1,len(v)):
	sum=(sum+v[i])/2
print(sum)

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=int(input())
A=[int(o) for o in input().split()]
ans=0

A.sort()
print(A)

ans=A[0]
for i in range(1,n):
    ans=(ans+A[i])/2
print(ans)

n=int(input())
A=[int(o) for o in input().split()]
ans=0

A.sort()

ans=A[0]
for i in range(1,n):
    ans=(ans+A[i])/2
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())

v = list(map(int, input().split()))

v = sorted(v, reverse = False)

sum = v[0] / 2**(N-1)
for i in range(1, N):
    sum += v[i]/2**(N-i)

pprint(sum)

N = int(input())

v = list(map(int, input().split()))

v = sorted(v, reverse = False)

sum = v[0] / pow(2, N-1)
for i in range(1, N):
    sum += v[i]/pow(2, (N-i))

print(sum)   

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
v = list(map(int, input().split()))

v_s = sorted(v)

for i in range(len(v_s)-1):
    v_s[i+1] = (v_s[i] + v_s[i+1]) / 2
    v_s[i] = 0

sum(v_s)

n = int(input())
v = list(map(int, input().split()))

v_s = sorted(v)

for i in range(len(v_s)-1):
    v_s[i+1] = (v_s[i] + v_s[i+1]) / 2
    v_s[i] = 0

print(sum(v_s))

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v = list(map(int,input().split()))

v = []
N = int(input())
v = list(map(int, input().split()))
v.sort()
for i in range(N):
  v[i] = (v[i-1]+v[i])/2
print(v[N-1])

N = int(input())
v = list(map(int,input().split()))
v.sort()
for i in range(N-1):
	v[i+1] = (v[i] + v[i+1])/2
print(v[N])

N = int(input())
v = list(map(int,input().split()))
v.sort()
for i in range(N-1):
	v[i+1] = (v[i] + v[i+1])/2
print(v[N-1])

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
v = sorted(list(map(int, input().split())))
print(v)
for _ in range(n-1):
    a = v.pop(0)
    b = v.pop(0)
    c = (a + b) / 2
    v.append(c)
    v.sort()

print(*v)


n = int(input())
v = sorted(list(map(int, input().split())))

for _ in range(n-1):
    a = v.pop(0)
    b = v.pop(0)
    c = (a + b) / 2
    v.append(c)
    v.sort()

print(*v)

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
v = list(map(float,input().split()))
v_list = sorted(v)
for i in range(n-1):
    a = (v_list[0]+v_list[1])/2
    v_list.append(a)
    v_list = sorted(v_list)
    del(v_list[0])
    del(v_list[1])

    
print(v_list)

n = int(input())
v = list(map(float,input().split()))
v_list = sorted(v)
for i in range(n-1):
    a = (v_list[0]+v_list[1])/2
    v_list.append(a)
    v_list = sorted(v_list)
    del(v_list[0])
    del(v_list[1])

    
print(v_list)

n = int(input())
v = list(map(float,input().split()))
v_list = sorted(v)
for i in range(n-1):
    a = (v_list[0]+v_list[1])/2
    v_list.append(a)
    v_list = sorted(v_list)
    del(v_list[0])
    del(v_list[1])

    
print(max(v_list))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
import numpy as np
n=int(input())
lista=list(map(int,input().split()))
lista=sorted(lista)
for i in range(n-1):
    lista.append((lista[i]+lista[i+1])/2)
    lista.pop(i+1)
    lista.pop(i)
print(lista)

n=int(input())
lista=list(map(int,input().split()))
lista.sort()
 
for i in range(n-1):
    lista.append((lista[0]+lista[1])/2)
    lista.pop(0)
    lista.pop(0)
    lista.sort()
    
print(lista[0])

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v = list(map(int,input().split()))
v = sorted(v)
print(v)

ans = v[0]
for k in range(1,N):
    ans = (ans+v[k])/2.

print(ans)


N = int(input())
v = list(map(int,input().split()))
v = sorted(v)
# print(v)

ans = v[0]
for k in range(1,N):
    ans = (ans+v[k])/2.

print(ans)



Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=input()
v=[]
for i in range(n):
  v.append(input())
v.sort()
s=0
while(len(v)>1):
    v0=v.pop(0)
    v1=v.pop(0)
    v.append((v0+v1)/2)
    v.sort()
print(v[0])

n=int(input())
v=list(map(int, input().split()))
v.sort()
s=0
while(len(v)>1):
    v0=v.pop(0)
    v1=v.pop(0)
    v.append((v0+v1)/2)
    v.sort()
print(v[0])

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v = list(map(int, input().split()))

v_sorted = sorted(v)
average = 0

for i in range(N - 1):
    v_sorted[i + 1] = (v_sorted[i] + v_sorted[i + 1]) / 2
    print(v_sorted, average)

print(v_sorted[-1])


N = int(input())
v = list(map(int, input().split()))

v_sorted = sorted(v)
average = 0

for i in range(N - 1):
    v_sorted[i + 1] = (v_sorted[i] + v_sorted[i + 1]) / 2

print(v_sorted[-1])


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N=int(input())
L=list(map(int,input().split()))
LR=sorted(L,reverse=True)
ans=0
for i range(N-1):
  ans=(L[i]+L[i+1])/2
print(ans)
  

N=int(input())
L=list(map(int,input().split()))
LR=sorted(L)
ans=LR[0]
for i in range(N-1):
  ans=(ans+LR[i+1])/2
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N=int(input())
v=list(map(int,input().split()))

v.sort()
for i in range(N-1):
  A=(v[0]+v[1])/2
  del v[0]
  del v[0]
  v.insert(0,A)
  
print(v)

N=int(input())
v=list(map(int,input().split()))

v.sort()
for i in range(N-1):
  A=(v[0]+v[1])/2
  del v[0]
  del v[0]
  v.insert(0,A)
  
print(v[0])

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
a = int(input())
b= [int(s) for s in input().split()]
b=sorted(b)

t = (b[0] + b[1])/2
for i in range(a-2):
  k = (t + b[i+2])/2
  t=k
  
print(k)


a = int(input())
b= [int(s) for s in input().split()]
b=sorted(b)

t = (b[0] + b[1])/2

if a!=2:
	for i in range(a-2):
  		k = (t + b[i+2])/2
  		t=k

print(t)


Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
#AtCoder

import sys
import math
import itertools

N = int(input())
V = sorted(list(map(int, input().split())))
print(V)

while len(V) != 1:
	V[1] = (V[0]+V[1])/2
	V.pop(0)

print(V[0])


"""

"""


#AtCoder

import sys
import math
import itertools

N = int(input())
V = sorted(list(map(int, input().split())))
print(V)

while len(V) != 1:
	V[1] = (V[0]+V[1])/2
	V.pop(0)

print(V[0])


"""

"""


#AtCoder

import sys
import math
import itertools

N = int(input())
V = sorted(list(map(int, input().split())))

while len(V) != 1:
	V[1] = (V[0]+V[1])/2
	V.pop(0)

print(V[0])


"""

"""


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
V = list(map(int, input().split()))
V.sorted()

ans = (V[0] + V[1]) / 2
for i in range(2, len(V) - 1)::
    ans = (ans + V[i]) / 2
print(ans)
  

N = int(input())
V = list(map(int, input().split()))
V.sort()

ans = (V[0] + V[1]) / 2
for i in range(2, len(V)):
    ans = (ans + V[i]) / 2
print(ans)
  

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
*l, = map(int,input().split())
l = l.sort()
ans=l[0]
for i in l:
  ans = ans/2 + i/2
print(ans)

n = int(input())
*l, = map(int,input().split())
l.sort()
ans=l[0]
for i in l:
  ans = ans/2 + i/2
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=input()
a=list(map(int,input().split()))
b=a.sorted
c=(b[0]+b[1])/2
for i in range(3,n+1):
  c=(c+b[i])/2
print(c)

n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
c=(b[0]+b[1])/2
for i in range(2,n):
  c=(c+b[i])/2
print(c)



Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
import numpy as np
N = int(input())
M = np.fromiter(input().split(), dtype=int)
K = (0.5) ** np.arange(1, N+1)
print(np.dot(M, K))

import heapq
N = int(input())
H = list(map(int, input().split()))
heapq.heapify(H)
while len(H) >= 2:
  f = heapq.heappop(H)
  s = heapq.heappop(H)
  heapq.heappush(H, (f + s) / 2)
print(H[0])


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v = list(map(int,input().split()))

v.sort()

res = v[0]

for i in range(i,N):
    res = (res + v[i]) / 2 

print(res)


N = int(input())
v = list(map(int,input().split()))

v.sort()

res = v[0]

for i in range(1,N):
    res = (res + v[i]) / 2 

print(res)



Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N=int(input())
V=list(map(input().split()))

V_sorted=sorted(V)

now_value=(V_sorted[0]+V_sorted[1])/2
for i in range(2,N):
    now_value=(now_value+V_sorted[i])/2

print(now_value)


    

    


N=int(input())
V=list(map(input().split()))

V_sorted=sorted(V)

now_value=(V_sorted[0]+V_sorted[1])/2
for i in range(2,N):
    now_value=(new_value+V_sorted[i])/2

print(now_value)


    

    


N=int(input())
V=list(map(input().split()))

V_sorted=sorted(V)

now_value=(V_sorted[0]+V_sorted[1])/2
for i in range(2,N):
    now_value=(now_value+V_sorted[i])/2

print(now_value)


    

    


N=int(input())
V=list(map(int,input().split()))

V_sorted=sorted(V)

now_value=(V_sorted[0]+V_sorted[1])/2
for i in range(2,N):
    now_value=(now_value+V_sorted[i])/2

print(now_value)


    

    


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
import sys 
stdin = sys.stdin
 
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
v = na()
v.sort(reverse=False)
ans = v[0]

for vi in v[1:]:
        ans = (ans + vi) / 2

print(int(ans))

import sys 
stdin = sys.stdin
 
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
s = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
v = na()
v.sort(reverse=False)
ans = v[0]

for vi in v[1:]:
        ans = (ans + vi) / 2

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=int(input())
v=list(map(int,input().split()))
V=v.sort()
cnt=(V[0]+V[1])/2
for i in range(2,n):
  cnt=(cnt+V[i])/2
print(cnt)

n=int(input())
v=list(map(int,input().split()))
v.sort()
cnt=(v[0]+v[1])/2
if n==2:
  print((v[0]+v[1])/2)
else:
  for i in range(2,n):
    cnt=(cnt+v[i])/2
  print(cnt)


Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
from sys import stdin

N = int(stdin.readline().rstrip())
v_lst = [int(v) for v in stdin.readline().rstrip().split()]
v_lst.sort()

while(len(v_lst) > 1):
  v0 = v_lst.pop(0)
  v1 = v_lst.pop(0)
  vn = (v0 + v1) / 2
  v_lst.append(vn)
  v_lst.sort()
  
print(int(v_lst[0]))

from sys import stdin

N = int(stdin.readline().rstrip())
v_lst = [int(v) for v in stdin.readline().rstrip().split()]
v_lst.sort()

while(len(v_lst) > 1):
  v0 = v_lst.pop(0)
  v1 = v_lst.pop(0)
  vn = (v0 + v1) / 2
  v_lst.append(vn)
  v_lst.sort()
  
print(v_lst[0])

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
N -= 1
D = deque(sorted(list(map(int, input().split()))))
ans = D.popleft() / (2 ** N)
while D:
  d = D.popleft()
  ans += d / (2 ** N)
  N -= 1
print(ans)

from collections import deque
N = int(input())
N -= 1
D = deque(sorted(list(map(int, input().split()))))
ans = D.popleft() / (2 ** N)
while D:
  d = D.popleft()
  ans += d / (2 ** N)
  N -= 1
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=int(input())
v=list(map(int, input().split())).sort()
sum=v[0]
for i in range(1,len(v)):
  sum=(sum+v[i])/2
print(sum)

n=int(input())
v=list(map(int, input().split()))
v.sort()
sum=v[0]
for i in range(1,len(v)):
  sum=(sum+v[i])/2
print(sum)

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
# -*- coding: utf-8 -*-

N = int(input())
V = list(map(int, input().split()))
V.sort()

mean = 0
for i in range(len(V)):
    mean += V[i]/2.**(len(V)-i)
print(mean)


N = int(input())
V = list(map(int, input().split()))
V.sort() 

mean = 0
for i in range(len(V)):
    mean += V[i]/2.**(len(V)-i)
print(mean + V[0]/2.**len(V))


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
vs = sorted(list(map(int,input().split())))
ans = (vs[0]+v[1])/2
for v in vs[2:]:
  ans = (ans + v)/2
print(ans)

N = int(input())
vs = sorted(list(map(int,input().split())))
ans = (vs[0]+vs[1])/2
for v in vs[2:]:
  ans = (ans + v)/2
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
if __name__ == '__main__':
    N = int(input())
    v = sorted(list(map(int, input().split())), reverse=True)
    while (len(v) > 1):
        pops = v[-2:]
        del v[-2:]
        ave = sum(pops) // 2
        v.append(ave)
    print(v.pop())

if __name__ == '__main__':
    N = int(input())
    v = sorted(list(map(float, input().split())), reverse=True)
    while (len(v) > 1):
        pops = v[-2:]
        del v[-2:]
        ave = sum(pops) / 2
        v.append(ave)
    print(v.pop())

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v = list(map(int,input().split()))
v_new = 0
for i in range(N-1):
    x = max(v)
    y = min(v)
    v_new = (x+y)/2
    v.append(v_new)
    v.remove(x)
    v.remove(y)
    v_new = 0
print(v)

N = int(input())
v = list(map(int,input().split()))
v.sort()
for i in range(N-1):
    S = (v[0]+v[1])/2
    v.append(S)
    v.remove(v[0])
    v.remove(v[0])
    v.sort()
print(*v)

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
v = list(map(int, input().split()))
#n = 3
#v = list(map(int, "500 300 200".split()))
v.sort()
ans = v[0]
for i in range(1,3):
    ans = (v[i] + ans)/2
print(ans)



input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
print(1.0/sum(list(map(lambda x: 1.0 / x, a))))


n = int(input())
v = list(map(int, input().split()))
v.sort()
ans = v[0]
for i in v[1:]:
    ans = (v[i] + ans)/2
print(ans)


#import sys
#input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
print(1.0/sum(list(map(lambda x: 1.0 / x, a))))


import sys
input = sys.stdin.readline
n = int(input())
a = list(map(int, input().split()))
print(1.0/sum(list(map(lambda x: 1.0 / x, a))))


n = int(input())
v = list(map(int, input().split()))
v.sort()
ans = v[0]
for i in range(1, n):
    ans = (v[i] + ans)/2
print(ans)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=int(input())
A=sorted(list(map(int,input().split())))
if n==2:
  print(sum(A)//2)
else:
  a=0
  for i in range(n-1):
    a+=(2**i)*(A[i+1])
  print((a+A[0])//(2**(n-1)))

n=int(input())
A=sorted(list(map(int,input().split())))
if n==2:
  print(sum(A)/2)
else:
  a=0
  for i in range(n-1):
    a+=(2**i)*(A[i+1])
  print((a+A[0])/(2**(n-1)))

Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
import sys
sys.setrecursionlimit(10**9)
n=int(input())
v=[int(x) for x in input().split()]

v=sorted(v)

def A(l):
    if len(l)==1:
        print(l[0])
    else:
        v_new=[]
        if len(l)%2==0:
            for i in range(0,len(l)-1,2):
                v_new.append((l[i]+l[i+1])/2)
            v_new=sorted(v_new)
            print(v_new)
            A(v_new)
        else:
            for i in range(0,len(l)-2,2):
                v_new.append((l[i]+l[i+1])/2)
            v_new.append(l[-1])
            v_new=sorted(v_new)
            print(v_new)
            A(v_new)

A(v)


from collections import deque
import sys
sys.setrecursionlimit(10**9)
n=int(input())
a=[int(x) for x in input().split()]

v=deque()
for x in sorted(a):
    v.append(x)
def A(l):
    if len(l)==1:
        print(l[0])
    else:
        l.appendleft((l.popleft()+l.popleft())/2)
        A(l)

A(v)


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n = int(input())
v = sorted(list(map(int, input().split())))
for _ in range(n - 1):
    v[1] = (v[0] + v[1]) / 2
    v = sorted(v)[1:]
print(v)

n = int(input())
v = sorted(list(map(int, input().split())))
for _ in range(n - 1):
    v[1] = (v[0] + v[1]) / 2
    v = sorted(v)[1:]
print(v[0])


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
n=int(input())
v= list(map(int,input().split()))
c=[0]*(n)
v.sort()
print(v)
ans=0
c[0]=v[0]
for i in range(1,n):
    c[i]=(c[i-1]+v[i])/2
print(c[n-1])


n=int(input())
v= list(map(int,input().split()))
c=[0]*(n)
v.sort()

ans=0
c[0]=v[0]
for i in range(1,n):
    c[i]=(c[i-1]+v[i])/2
print(c[n-1])


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
# coding: utf-8
N = int(input())
V = list(map(int, input().split()))
V.sort()
print(V)
ans = 0
for i in range(N//2):
    tmp = (V[2*i] + V[2*i+1]) / 2
    if i == 0:
        ans = tmp
    else:
        ans = (ans + tmp) / 2
if N % 2 == 1:
    ans = (ans + V[-1]) / 2
print(ans)

# coding: utf-8
N = int(input())
V = list(map(int, input().split()))
V.sort()
ans = 0
for i in range(N):
    if i == 0:
        ans = V[i]
    else:
        ans = (ans + V[i]) / 2
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You have a pot and N ingredients. Each ingredient has a real number parameter called _value_ , and the value of the i-th ingredient (1 \leq i \leq N) is v_i.  When you put two ingredients in the pot, they will vanish and result in the formation of a new ingredient. The value of the new ingredient will be (x + y) / 2 where x and y are the values of the ingredients consumed, and you can put this ingredient again in the pot.  After you compose ingredients in this way N-1 times, you will end up with one ingredient. Find the maximum possible value of this ingredient.

Submission attempts (in order):
N = int(input())
v_list = input().split()
v_list = [int(v_list(i)) for i in range(N)]
v_list.sort()
ans = int(v_list[0])
for i in range(1, N):
    ans = (ans + int(v_list[i]))/2 
print(ans)

N = int(input())
v_list = list(map(int, input().split()))
v_list.sort()
ans = v_list[0]
for i in range(1, N):
    ans = (ans + v_list[i])/2 
print(ans)

Verdicts: Runtime Error

Accepted