ZhenlongDai/ACPR huggingface dataset:
Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A,B,C,X,Y = map(int,input().split())

plan1 = (A*X) + (B*Y)
plan2 = (C*2) * max(X,Y)
plan3 = (C*2) * X + B*(Y-X)
plan4 = (C*2) * Y + A*(Y-X)

if X <= Y:
  print(min(plan1,plan2,plan3))
else:
  print(min(plan1,plan2,plan4))

Failing test case input:
1297 886 1708 5 3

Expected output:
9143


Actual output:
7654


Fixed submission (verdict: Accepted):
A,B,C,X,Y = map(int,input().split())

plan1 = (A*X) + (B*Y)
plan2 = (C*2) * max(X,Y)
plan3 = (C*2) * X + B*(Y-X)
plan4 = (C*2) * Y + A*(X-Y)

if X <= Y:
  print(min(plan1,plan2,plan3))
else:
  print(min(plan1,plan2,plan4))

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y = map(int,input().split())
mo=[a,b]
if(a+b>2*c):
    sum=2*min(x,y)*c+max(x-y,y-x)*min(2*c,mo[x>y],mo[y<x])
else:
    sum=a*x+b*y
print(sum)

Failing test case input:
1500 2000 1166 0 2

Expected output:
4000


Actual output:
3000


Fixed submission (verdict: Accepted):
a,b,c,x,y = map(int,input().split())
mo=[a,b]
if(a+b>2*c):
    sum=2*min(x,y)*c+max(x-y,y-x)*min(2*c,mo[x<=y])
else:
    sum=a*x+b*y
print(sum)

Problem: p03371
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b,c,x,y = nm()

min_cost = 10**6
for i in range(10**5+1):
  cost=2*c*i
  cost+=max(0,x-i)*a
  cost+=max(0,y-i)*b
  min_cost = min(min_cost,cost)
print(min_cost)


Failing test case input:
1928 3132 265 90000 100000

Expected output:
53000000


Actual output:
1000000


Fixed submission (verdict: Accepted):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b,c,x,y = nm()

min_cost = 10**10
for i in range(10**5+1):
  cost=2*i*c+max(0,x-i)*a+max(0,y-i)*b
  min_cost = min(min_cost,cost)
print(min_cost)

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C, X, Y = map(int,input().split())

if X>Y:
  print(min(A*X+B*Y, A*(X-Y)+C*Y*2, C*X*2))
if Y>X:
  print(min(A*X+B*Y, B*(Y-X)+C*X*2, C*Y*2))

Failing test case input:
1500 2000 1343 3 3

Expected output:
8058


Actual output:

Fixed submission (verdict: Accepted):
A, B, C, X, Y = map(int,input().split())

if X>Y:
  print(min(A*X+B*Y, A*(X-Y)+C*Y*2, C*X*2))
if Y>=X:
  print(min(A*X+B*Y, B*(Y-X)+C*X*2, C*Y*2))

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
A, B, C, X, Y = map(int, input().split())
cost1 =  A+B; cost2 = C*2

if X == Y :
  print( X* min( cost1, cost2))
if X> Y:
  print( min( Y* min( cost1, cost2) + (X-Y)*A , X* min( cost1, cost2)))
else :
  print( min( X* min( cost1, cost2) + (Y-X)*B , Y* min( cost1, cost2)))


Failing test case input:
542 2000 1343 3 3

Expected output:
7626


Actual output:
7626
7626


Fixed submission (verdict: Accepted):
A, B, C, X, Y = map(int, input().split())
cost1 =  A+B; cost2 = C*2

if X == Y :
  print( X* min( cost1, cost2))
elif X > Y:
  a = Y * min( cost1, cost2) + ( X - Y) * A
  b = X * min( cost1, cost2)
  print( min( a, b))
else :
  a = X * min( cost1, cost2) + ( Y - X) * B
  b = Y * min( cost1, cost2)
  print( min(a,b))
Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x, y = map(int, input().split())
out1 = a * x + a * y
if x > y:
    out3 = y*c*2 + (x-y)*a
else:
    out3 = x*c*2 + (y-x)*a
print(min([out1, out3]))

Failing test case input:
124 6 75 1 6

Expected output:
160


Actual output:
770


Fixed submission (verdict: Accepted):
a, b, c, x, y = map(int, input().split())
out1 = a * x + b * y
if x > y:
    out2 = x*c*2
    out3 = y*c*2 + (x-y)*a
else:
    out2 = y*c*2
    out3 = x*c*2 + (y-x)*b
print(min([out1, out2, out3]))

Problem: p03371
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
pa, pb, pab, x, y = map(int, input().split())
li = []
if x-y>= 0:
    li.append(pa*x+pb*y)
    li.append(pa*(x-y)+pab*2*y)
    li.append(pab*2*x)
if y-x>= 0:
    li.append(pa*x+pb*y)
    li.append(pb*(y-x)+pab*2*y)
    li.append(pab*2*y)
li.sort()
print(li[0])

Failing test case input:
97 2 21 1 8

Expected output:
56


Actual output:
113


Fixed submission (verdict: Accepted):
pa, pb, pab, x, y = map(int, input().split())
li = []
if x-y>= 0:
    li.append(pa*x+pb*y)
    li.append(pa*(x-y)+pab*2*y)
    li.append(pab*2*x)
if y-x>= 0:
    li.append(pa*x+pb*y)
    li.append(pb*(y-x)+pab*2*x)
    li.append(pab*2*y)
li.sort()
print(li[0])

Problem: p03371
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    a, b, c, x, y = map(int, input().split())
    lim = max(x, y)
    ans = 10**8
    for i in range(lim+1):
        price = a*max(0, x-i) + b*max(0, y-i) + c*2*i
        ans = min(ans, price)
    print(ans)

if __name__ == '__main__':
    main()

Failing test case input:
1500 3132 752 90000 100000

Expected output:
150400000


Actual output:
100000000


Fixed submission (verdict: Accepted):
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    a, b, c, x, y = map(int, input().split())
    lim = max(x, y)
    ans = 10**12
    for i in range(lim+1):
        price = a*max(0, x-i) + b*max(0, y-i) + c*2*i
        ans = min(ans, price)
    print(ans)

if __name__ == '__main__':
    main()

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y=map(int,input().split())
if a+b>2*c and x>y:
    if a<2*c:
        print(2*c*y+a*(x-y))
    else:
        print(2*c*x)
if a+b>2*c and x<y:
    if b<2*c:
        print(2*c*x+b*(y-x))
    else:
        print(2*c*y)
else:
    print(a*x+b*y)

Failing test case input:
542 2000 841 5 3

Expected output:
6130


Actual output:
6130
8710


Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int,input().split())
if a+b>2*c and x>=y:
    if a<2*c:
        print(2*c*y+a*(x-y))
    else:
        print(2*c*x)
elif a+b>2*c and x<y:
    if b<2*c:
        print(2*c*x+b*(y-x))
    else:
        print(2*c*y)
else:
    print(a*x+b*y)
Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y = list(map(int, input().split()))

if a + b < 2*c :
    print(x*a + y*b)
else :
    if a > 2*c or b > 2*c:
        print(max(x,y)*2*c)
    else :
        if x >= y :
            print(y*2*c + (x-y)*a)
        else :
            print(x*2*c + (y-x)*b)




Failing test case input:
97 2 21 1 8

Expected output:
56


Actual output:
336


Fixed submission (verdict: Accepted):
a,b,c,x,y = list(map(int, input().split()))

if a + b < 2*c :
    print(x*a + y*b)
else :
    if x >= y :
        if a >= 2*c:
            print(y*2*c + (x-y)*2*c)
        else :
            print(y*2*c + (x-y)*a)

    else :
        if b >= 2*c:
            print(x*2*c + (y-x)*2*c)
        else:
            print(x*2*c + (y-x)*b)

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y = list(map(int, input().split()))

s1 = a*x + b*y
s2 = c*(max(x,y)*2)
if x>y:
    s3 = c*(y*2) + a*(x-y)
elif y>x:
    s3 = c*(x*2) + b*(y-x)
else: s3 = 10**10

print(s1,s2,s3)
print(min(s1,s2,s3))

Failing test case input:
97 2 21 1 8

Expected output:
56


Actual output:
113 336 56
56


Fixed submission (verdict: Accepted):
a,b,c,x,y = list(map(int, input().split()))

s1 = a*x + b*y
s2 = c*(max(x,y)*2)
if x>y:
    s3 = c*(y*2) + a*(x-y)
elif y>x:
    s3 = c*(x*2) + b*(y-x)
else: s3 = 10**10

print(min(s1,s2,s3))

Problem: p03371
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys
input = sys.stdin.readline

A,B,C,X,Y = list(map(int,input().split()))
cost = A*X+B*Y
if X >= Y:
    maxXY = X
    maxAB = A
else:
    maxXY = Y
    maxAB = B
ans = cost
for xy in range(1,maxXY+1):
    nc =  2*C*xy +max(0,(X-xy))*A+max(0,(Y-xy))*B
    
    if nc >= cost: 
        break
    else:
        ans = nc
print(ans)
    


Failing test case input:
115 1 6 1 12

Expected output:
23


Actual output:
122


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline

A,B,C,X,Y = list(map(int,input().split()))
cost = A*X+B*Y
if X >= Y:
    maxXY = X
    maxAB = A
else:
    maxXY = Y
    maxAB = B
ans = cost
for xy in range(1,maxXY+1):
    nc =  2*C*xy +max(0,(X-xy))*A+max(0,(Y-xy))*B
    
    if nc < cost: 
        ans = min(ans,nc)
print(ans)

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
A,B,C,x,y=map(int,input().split())
price=5000*(10**5)
for a in range(x+1):
    c=(x-a)*2
    b=math.ceil(y-c/2)
    if c<0 or b<0:
        continue
    if A*a+B*b+C*c<price:
        price=A*a+B*b+C*c
print(price)

Failing test case input:
1500 2445 500 90000 100000

Expected output:
100000000


Actual output:
114450000


Fixed submission (verdict: Accepted):
import math
A,B,C,x,y=map(int,input().split())
price=5000*(10**6)
for c in range(1+max([2*x,2*y])):
    a=0
    b=0
    if x>c/2:
        a=math.ceil(x-(c/2))
    if y>c/2:
        b=math.ceil(y-(c/2))
    if A*a+B*b+C*c<price:
        price=A*a+B*b+C*c
print(price)
Problem: p03371
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
a,b,c,x,y = map(int, input().split())

if a>= c*2 and b >= c*2:
    print(max(x,y)*c*2)

elif a + b <= c*2:
    print(a*x+b*y)
    
elif a+b > c*2:
    if x > y:
        print(y*c*2+(x-y)*a)
    else:
        print(x*c*2+(y-x)*b)

Failing test case input:
1500 3132 752 90000 100000

Expected output:
150400000


Actual output:
166680000


Fixed submission (verdict: Accepted):
a,b,c,x,y = map(int, input().split())

if a>= c*2 and b >= c*2:
    print(max(x,y)*c*2)

elif a>= c*2 and x>=y :
    print(x*c*2)

elif b >= c*2 and y>=x:
    print(y*c*2)

elif a + b < c*2:
    print(a*x+b*y)
    
elif a+b >= c*2:
    if x > y:
        print(y*c*2+(x-y)*a)
    else:
        print(x*c*2+(y-x)*b)

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
line = input()
a, b, c, x, y = map(int, line.split(' '))

print(a, b, c, x, y)

if x < y:
    pizza = [(x, a), (y, b)]
else:
    pizza = [(y, b), (x, a)]

values = list()
values.append(c * 2 * pizza[0][0] + pizza[1][1] * (pizza[1][0] - pizza[0][0]))
values.append(c * 2 * pizza[1][0])
values.append(a * x + b * y)

print(min(values))


Failing test case input:
542 2000 1343 3 0

Expected output:
1626


Actual output:
542 2000 1343 3 0
1626


Fixed submission (verdict: Accepted):
line = input()
a, b, c, x, y = map(int, line.split(' '))

if x < y:
    pizza = [(x, a), (y, b)]
else:
    pizza = [(y, b), (x, a)]

values = list()
values.append(c * 2 * pizza[0][0] + pizza[1][1] * (pizza[1][0] - pizza[0][0]))
values.append(c * 2 * pizza[1][0])
values.append(a * x + b * y)

print(min(values))

Problem: p03371
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
A, B, C, X, Y = map(int, input().split())
minim = 1e10
for i in range(max(X, Y)):
    bill = i*2*C + A*max(0, X-i) + B*max(0, Y-i)
    minim = min(minim, bill)
print(minim)

Failing test case input:
1928 3132 265 90000 100000

Expected output:
53000000


Actual output:
53002602


Fixed submission (verdict: Accepted):
A, B, C, X, Y = map(int, input().split())
minim = 1e10
for i in range(max(X, Y)+1):
    bill = i*2*C + A*max(0, X-i) + B*max(0, Y-i)
    minim = min(minim, bill)
print(minim)

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y = map(int,input().split())
mo=[a,b]
if(a+b>2*c):
    sum=2*min(x,y)*c+max(x-y,y-x)*min(2*c,mo[x>y])
else:
    sum=a*x+b*y
print(sum)

Failing test case input:
1500 2000 1615 3 2

Expected output:
7960


Actual output:
8460


Fixed submission (verdict: Accepted):
a,b,c,x,y = map(int,input().split())
mo=[a,b]
if(a+b>2*c):
    sum=2*min(x,y)*c+max(x-y,y-x)*min(2*c,mo[x<=y])
else:
    sum=a*x+b*y
print(sum)
Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x, y = [int(i) for i in input().split()]

if a >= 2*c and b >= 2*c:
    ans = 2 * c * max(x,y)
elif a+b >= 2*c:
    if x >= y:
        ans = c * 2 * y
        ans += a * (x - y)
    else:
        ans = c * 2 * x
        ans += b * (y - x)
else:
    ans = a * x + b * y
    
print(ans)

Failing test case input:
251 8 86 6 3

Expected output:
1032


Actual output:
1269


Fixed submission (verdict: Accepted):
a, b, c, x, y = [int(i) for i in input().split()]

if a+b <= 2*c:
    ans = a * x + b * y
else:
    if x >= y:
        ans = c * 2 * y
        ans += (a if a <= 2*c else 2*c) * (x - y)
    else:
        ans = c * 2 * x
        ans += (b if b <= 2*c else 2*c) * (y - x)

print(ans)

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y=map(int,input().split())
if 2*c>=a+b:
	print(a*x+b*y)
elif x<y:
	print(c*2*x+b*(y-x))
else:
	print(c*2*y+a*(x-y))

Failing test case input:
1143 3132 1087 90000 100000

Expected output:
217400000


Actual output:
226980000


Fixed submission (verdict: Accepted):
a,b,c,x,y=map(int,input().split())
if 2*c>=a+b:
	print(a*x+b*y)
elif x<y:
	print(min(c*2*x+b*(y-x),c*2*y))
else:
	print(min(c*2*y+a*(x-y),c*2*x))

Problem: p03371
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
A, B, C, X, Y = map(int, input().split())

ans = A*X + B*Y

i = 1
while True:
    if X-i < 0 or Y-i < 0:
        break
    cost = A*(X-i) + B*(Y-i) + 2*C*i
    if cost > ans:
        break
    ans = min(cost, ans)
    i += 1

print(ans)


Failing test case input:
251 6 75 6 3

Expected output:
900


Actual output:
1203


Fixed submission (verdict: Accepted):
A, B, C, X, Y = map(int, input().split())

ans = A*X + B*Y

i = 1
while True:
    cost = A*max(X-i, 0) + B*max(Y-i, 0) + 2*C*i
    if cost > ans:
        break
    ans = min(cost, ans)
    i += 1

print(ans)

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a,b,c,x,y = map(int,input().split())
min = x if x<y else y
price=0
if a+b > 2*c:
    price = min*2*c
    if a < c*2 and a<b:
        price+=a*(x-y)
    elif b<c*2 and b<a:
        price+=b*(y-x)
    else:
        price+=2*c*(y-x)
else:
    price = a*x+b*y
print(price)

Failing test case input:
1500 2000 1166 0 2

Expected output:
4000


Actual output:
-3000


Fixed submission (verdict: Accepted):
a,b,c,x,y = map(int,input().split())
min = x if x<y else y
price=0
if a+b > 2*c:
    price = min*2*c
    if a < c*2 and y<x:
        price+=a*(x-y)
    elif b<c*2 and x<y:
        price+=b*(y-x)
    else:
        diff = y-x if x<y else x-y
        price+=2*c*(diff)
else:
    price = a*x+b*y
print(price)
Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x, y = map(int, input().split())
if a + b < 2 * c:
  print(a * x + b * y)
else:
  if x > y:
    if a < 2 * c:
      print(c * 2 * y + a * (x-y))
    else:
      print(c * 2 * y + c * (x-y))
  else:
    if b < 2 * c:
      print(c * 2 * x + b * (y-x))
    else:
      print(c * 2 * x + c * (x-y))


Failing test case input:
1500 2445 500 90000 100000

Expected output:
100000000


Actual output:
85000000


Fixed submission (verdict: Accepted):
a, b, c, x, y = map(int, input().split())
if a + b < 2 * c:
  print(a * x + b * y)
else:
  if x > y:
    if a < 2 * c:
      print(c * 2 * y + a * (x-y))
    else:
      print(c * 2 * y + c * 2 * (x-y))
  else:
    if b < 2 * c:
      print(c * 2 * x + b * (y-x))
    else:
      print(c * 2 * x + c * 2 * (y-x))

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, ab, xa, yb = map(int, input().split())
price = []
for i in range(100):
    price.append(i * 2 * ab + max(xa - i, 0) * a + max(yb - i, 0) * b)

print(min(price))


Failing test case input:
1928 3132 265 90000 100000

Expected output:
53000000


Actual output:
486271530


Fixed submission (verdict: Accepted):
a, b, ab, xa, yb = map(int, input().split())
price = []
for i in range(100001):
    price.append(i * 2 * ab + max(xa - i, 0) * a + max(yb - i, 0) * b)

idx = price.index(min(price))

print(min(price))

Problem: p03371
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a, b, c, x, y = list(map(int, input().split()))
n = [0, 0, 0]
n[0] = a*x+b*y
if x<=y:
    n[1] = 2*c*x+b*(y-x)
else:
    n[1] = 2*c*x+a*(x-y)
n[2] = 2*c*max(x, y)
print(min(n))

Failing test case input:
1839 1572 1600 3 2

Expected output:
8239


Actual output:
8661


Fixed submission (verdict: Accepted):
a, b, c, x, y = list(map(int, input().split()))
n = [0, 0, 0]
n[0] = a*x+b*y
if x<=y:
    n[1] = 2*c*x+b*(y-x)
else:
    n[1] = 2*c*y+a*(x-y)
n[2] = 2*c*max(x, y)
print(min(n))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
As = list(map(int, input().split()))

As.sort()

print(sum(As[N:2*N]))


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010000101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333334235


Actual output:
10022347313


Fixed submission (verdict: Accepted):
N = int(input())
As = list(map(int, input().split()))

As.sort()

print(sum(As[N:][::2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = input().split()
a_i = [int(s) for s in a]
a_i.sort()
print(a_i)
result = 0
for i in range(N,N + N):
    result += int(a_i[i])
print(result)

Failing test case input:
10
1100000000 1000100100 1100100011 0000001000 1000001001 1000001000 1010100000 1000001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000110 1000000011 1000010000 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331332311


Actual output:
[1000, 1100100, 100110000, 1000000000, 1000000000, 1000000011, 1000001000, 1000001000, 1000001001, 1000001100, 1000010000, 1000011000, 1000011000, 1000100000, 1000100100, 1000101110, 1000110000, 1001000100, 1010000000, 1010000000, 1010000100, 1010000110, 1010100000, 1010100000, 1100000000, 1100000001, 1100001001, 1100100011, 1101000110, 1101100010]
10021443310


Fixed submission (verdict: Accepted):
N = int(input())
a = input().split()
a_i = [int(s) for s in a]
a_i.sort(reverse=True)
result = 0
for i in range(1,2 * N,2):
    result += a_i[i]
print(result)

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
k = 0
for i in range(1, len(A)-N, 2):
  k += A[i]
  print(k)


Failing test case input:
10
1000000000 1000000000 1000000000 0000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000010 1000000000 1000000000 1000010000 1000000000 1000000000 1100000000 0000100000 1000000000 1000000000 1000000000 1000000000 1000000000 1100100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000

Expected output:
10100000010


Actual output:
1100000000
2100000010
3100000010
4100000010
5100000010
6100000010
7100000010
8100000010
9100000010
10100000010


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
k = 0
for i in range(1, len(A)-N, 2):
  k += A[i]
print(k)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = list(map(int, input().split()))
a.sort()
score = 0

for i in range(1, N*3, 3):
    score += a[i]

print(score)

Failing test case input:
2
-2 1 3 6 -4 0

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int, input().split()))
a.sort()
score = 0

for i in range(N, N*3, 2):
    score += a[i]

print(score)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
print(sum(A[2:2 * n + 1:2]))


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010000101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333334235


Actual output:
10233533302


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
print(sum(A[1:2 * n:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

A = sorted(A, reverse=True)
total = 0
for i in range(N):
  total += A[N+i]

print(total)

Failing test case input:
10
1000000000 1000100000 0000000001 0000000000 0000000000 1000000000 1000000000 0000000000 1000100000 1010000000 1000000010 1010000000 1000010000 1000011000 1000000000 1000000000 1100000000 0001100100 1000000000 1000000001 1000000001 1000000000 1010000000 1100100000 1001000000 1000000000 1000000001 1000000000 1000000000 1110000000

Expected output:
10120211011


Actual output:
10000010013


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))

A.sort()
total = 0
for i in range(N):
  
  total += A[N + 2*i]

print(total)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

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

a.sort()
print(sum(a[n:2*n]))



Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1010000001 1100110000 1001011000 1011100000 1101100011 0100110000 0111110101 1000000000 1001000111 1000000001 1000110001 0010000110 0100000001 1001011100 1000011000 1110001001 1000001000 1000000000 1000000100

Expected output:
10233632113


Actual output:
10003346313


Fixed submission (verdict: Accepted):

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

a.sort()
del a[:n]
print(sum(a[0::2]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = sorted(list(map(int, input().split())))

syo = a[0:n]
tyu = a[n:2*n]
dai = a[2*n:3*n]

print(sum(tyu))


Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10322534322


Actual output:
10012554323


Fixed submission (verdict: Accepted):
n = int(input())
a = sorted(list(map(int, input().split())))

syo = a[0:n]
tyu = a[n:2*n]
dai = a[2*n:3*n]

l = a[n:3*n]
sec = l[0::2]

print(sum(sec))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

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

s.sort(reverse = True)

t = s[n:n*2]

print(sum(t))

Failing test case input:
10
1000000000 1000100100 1100100011 0000001000 1000001001 1000001000 1010100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000110000 1000011000 1010000000 1001100010 0100100000 0001100100 1000000000 1101000110 1000000001 1000010000 1010000110 1100000001 1001000100 1000001000 1100001001 1000000000 1000000000 1010000100

Expected output:
10231523231


Actual output:
10012433211


Fixed submission (verdict: Accepted):
n = int(input())

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

s.sort(reverse = True)

ans = 0

for i in range(1,2*n+1,2):
    ans += s[i]
    
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = sorted(list(map(int, input().split())), reverse=False)

ans = 0
for i in range(N,N*2):
    ans += A[i]
print(ans)

Failing test case input:
10
1000000000 1000100100 1100100011 0000001000 1000001001 1000001000 1010100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000110 1000000001 1000010000 1010000100 1100000001 1001000100 1000001000 1100001001 1000000000 1000000000 1010000100

Expected output:
10231424311


Actual output:
10012333201


Fixed submission (verdict: Accepted):
N = int(input())
A = sorted(list(map(int, input().split())), reverse=True)

ans = 0
for i in range(0,N*2,2):

    ans += A[i+1]
print(ans)
Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
lis = list(map(int, input().split()))

lis  =sorted(lis)


t1 = lis[n:2*n]


nlis = lis[::-1]

t2 = 0
for i in nlis[1:0:3]:
    t2 += i

print(max(sum(t1), t2))

Failing test case input:
10
1100000000 1000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1000001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000110 1000000011 1000110000 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331423321


Actual output:
10021543310


Fixed submission (verdict: Accepted):
n = int(input())
lis = list(map(int, input().split()))

lis  =sorted(lis)

t1 = sum(lis[n:2*n])


nlis = lis[::-1]

t2 = 0
for i in nlis[1:2*n:2]:
    t2 += i


print(max(t1, t2))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
A.sort()
ans=0
for i in range(N*3):
  if(i%3==1):
    ans+=A[i]
print(ans)

Failing test case input:
10
1000000000 1000100100 1100100011 0000001000 1000001001 1000001000 1010100000 1000000100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1001100010 0100100000 0001100100 1000000000 1101000110 1000000001 1000010000 1010000110 1100000001 1001000100 1000001000 1100001001 1000000000 1000000000 1010000100

Expected output:
10231412322


Actual output:
9122513332


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
A.sort()
ans=0
for i in range(N):
  ans+=A[N*3-2-i*2]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
print(sum(sorted(a)[n:2*n]))


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1010000001 1100110000 1001011000 1011100000 1101100011 0100110000 0111110101 1000000000 1001000111 1000000001 1000110001 0010000110 1100000001 1001011100 1000011000 1110001001 1000001000 1000000000 1000000100

Expected output:
10323435323


Actual output:
10013346214


Fixed submission (verdict: Accepted):
import itertools
n=int(input())
a=list(map(int,input().split()))
print(sum(sorted(a,reverse=True)[1:2*n:2]))

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
a = sorted(list(map(int, input().split())))[::-1]

print(sum(a[n:n+n:]))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1100000110 1010000001 1100110000 1001011000 1011000000 1101100011 0100110000 0011100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10333334225


Actual output:
10033344414


Fixed submission (verdict: Accepted):
n = int(input())
a = sorted(list(map(int, input().split())))[::-1]

print(sum([a[2*i+1] for i in range(n)]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
li =  sorted(list(map(int,input().split())))

count = 0
i=0
k = n

while(i<n):
    count += li[k]
    k += 1
    i += 1

print(count)


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000000000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010000101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333323335


Actual output:
10022247413


Fixed submission (verdict: Accepted):
n = int(input())
li =  sorted(list(map(int,input().split())) , reverse=True)
count = 0
k = 1
for i in range(n):
    count += li[k]
    k += 2

print(count)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
c = 0
t = 1
while t < 2*n:
  c += a[t]
  t += 2
print(c)

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1101000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10332622133


Actual output:
7333414422


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
a.sort(reverse=True)
c = 0
t = 1
while t < 2*n:
  c += a[t]
  t += 2
print(c)

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(N,2*N):
    ans += a[i] 
print(ans)

Failing test case input:
2
0 -1 26 4 3 0

Expected output:
4


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(N,3*N,2):
    ans += a[i] 
print(ans)

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import heapq

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

ans = 0
b = list(map(lambda x: x * (-1), a))
heapq.heapify(b)
for _ in range(N):
    heapq.heappop(b)
for _ in range(N):
    ans -= heapq.heappop(b)
print(ans)


Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000110 1010000001 1100110000 1001011000 1011000000 1101100011 0100110000 0011100101 1000000000 1001000111 1000000001 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331433214


Actual output:
10023344314


Fixed submission (verdict: Accepted):
import heapq

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

ans = 0
b = list(map(lambda x: x * (-1), a))
heapq.heapify(b)
for _ in range(N):
    heapq.heappop(b)
    ans -= heapq.heappop(b)
print(ans)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a3n = list(map(int,input().split()))

a3n = sorted(a3n,reverse=True)

print(sum(a3n[n:2*n]))

Failing test case input:
10
1000000000 1000100000 0000000000 0000000000 1000000000 1000000000 1000000000 0000000000 1000000000 1000000000 1000000010 1000000000 1000000000 1000010000 1000000000 1000000000 1100000000 0000100100 1000000000 1000000000 1000000001 1000000000 1000000000 1100100000 1001000000 1000000000 1000000000 1000000000 1000000000 1000000000

Expected output:
10100100010


Actual output:
10000000000


Fixed submission (verdict: Accepted):
n = int(input())
a3n = list(map(int,input().split()))

a3n = sorted(a3n,reverse=True)

print(sum(a3n[1:2*n:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=list(map(int,input().split()))
b=sorted(a)
ans1=sum(b[N:2*N])

ans2=0
for i in range(N):
    ans2 += b[i*3+1]

print(max(ans1,ans2))






    



Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10322524333


Actual output:
10012544323


Fixed submission (verdict: Accepted):
N=int(input())
a=list(map(int,input().split()))
b=sorted(a)

ans3=0
for i in range(N):
    ans3 += b[i*2+N]

print(ans3)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

a.sort(reverse=True)

ans = sum(a[n:len(a) - n])
print(ans)

Failing test case input:
10
1000000000 1000100000 0100100001 0000001000 0000000000 1000000000 1000000000 0100000100 1000100000 1010100000 1000100110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1100000000 1000000001 1000010000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000100

Expected output:
10121321101


Actual output:
10000131002


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

a.sort(reverse=True)

ans = sum(a[1:2*n+1:2])
print(ans)

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
print(sum(sorted(list(map(int,input().split())))[2*n:1:-2]))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1010000001 1100110000 1001011000 1011100000 1101100011 0100110000 0011110101 1000000000 1001000111 1000000001 1000110001 0010000110 1100000001 1001011100 1000011000 1100001001 1000001000 1000000000 1000000100

Expected output:
10322336324


Actual output:
8123236414


Fixed submission (verdict: Accepted):
n=int(input())
print(sum(sorted(list(map(int,input().split())),reverse=True)[1:2*n:2]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(N, 2 * N):
    ans += a[i]

print(ans)

Failing test case input:
10
1000000000 1000100000 0000000001 0000000000 0000000000 1000000000 1000000000 0000000000 1000100000 1010000000 1000000010 1010000000 1000000000 1000011000 1000000000 1000000000 1100000000 0001100100 1000000000 1000000001 1000000001 1000000000 1010000000 1100100000 1001000000 1000000000 1000000001 1000000000 1000000000 1110000000

Expected output:
10120211002


Actual output:
10000000013


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int, input().split()))
a.sort()
ans = 0
for i in range(N, 3 * N, 2):
    ans += a[i]

print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = list(map(int,input().split()))
A.sort()
print(sum(A[n:-n]))

Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 0000000000 1000000000 1000000000 1100000100 1000100000 1010100000 1000101110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1100000000 1000000001 1000010000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000100

Expected output:
10221321212


Actual output:
10000332112


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int,input().split()))
A.sort(reverse = 1)
print(sum(A[1:2*n+1:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = list(map(int, input().split()))
a.sort()
score = 0

for i in range(N):
    score += a[N*3-i-2]

print(score)

Failing test case input:
10
1100000000 1000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1000001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110000 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331423322


Actual output:
10551301334


Fixed submission (verdict: Accepted):
N = int(input())
a = list(map(int, input().split()))
a.sort()
score = 0

for i in range(N, N*3, 2):
    score += a[i]

print(score)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
sorted_A = sorted(A)
print(sum(sorted_A[N:2*N]))

Failing test case input:
10
1000000000 1000100100 1100100011 0000001000 1000001001 1000001000 1010100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000110 1000000001 1000010000 1010000100 1100000001 1001000100 1000001000 1100001001 1000000000 1000000000 1010000100

Expected output:
10231424311


Actual output:
10012333201


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
sorted_A = sorted(A)
print(sum(sorted_A[N:3*N:2]))
Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = [int(i) for i in range(3*n)]
a.sort()
ans = 0
for i in range(3*n):
  if i >= n and (i-n) % 2 == 0:
    ans += a[i]
print(ans)

Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000000110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1110000100

Expected output:
10322435213


Actual output:
190


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
ans = 0
for i in range(3*n):
  if i >= n and (i-n) % 2 == 0:
    ans += a[i]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(i) for i in input().split()]
a.sort(reverse=True)
print(sum(a[n:2*n]))

Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000000001 1000001000 1000000000 1100000100 1000100000 1010100000 1000101110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000000 1100000000 1001000100 1000001000 1000000001 1000000000 1000000000 1110000100

Expected output:
10222222201


Actual output:
10000334112


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(i) for i in input().split()]
a.sort(reverse=True)
ans = 0
for i in range(n):
  ans += a[i*2+1]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

a.sort(reverse = True)
ans = 0

for i in range(n):
	ans += a[n+i]
    
print(ans)

Failing test case input:
2
1 4 8 9 1 2

Expected output:
10


Actual output:
6


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))
a = sorted(a, reverse=True)
ans = 0
for i in range(n):
  ans += a[2*i+1]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=[int(x) for x in input().split()]
a.sort()

ans=0
for i in range(n):
    ans+=a[n+i]
print(ans)

Failing test case input:
10
1100000000 1000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1000001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110000 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331423322


Actual output:
10021543310


Fixed submission (verdict: Accepted):
n=int(input())
a=[int(x) for x in input().split()]
a.sort(reverse=1)

ans=0
for i in range(n):
    ans+=a[2*i+1]
print(ans)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = input().split()
a = [int(i) for i in a]
 
candidate = a[n:len(a)+1]
print(sum([candidate[i] for i in range(1, 2*n+1, 2)]))

Failing test case input:
10
1100000000 1000100100 1100100011 0100001000 1000001001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1010000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110001 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10332322422


Actual output:
9323333323


Fixed submission (verdict: Accepted):
n = int(input())
a = input().split()
a = [int(i) for i in a]
a = sorted(a)
 
candidate = a[n:len(a)+1]
print(sum([candidate[i] for i in range(0, 2*n, 2)]))

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = [int(i) for i in range(3*n)]

ans = 0
for i in range(3*n):
  if i >= n and (i-n) % 2 == 0:
    ans += a[i]
print(ans)

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000100000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010000101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333334235


Actual output:
190


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(i) for i in input().split()]
a.sort()
ans = 0
for i in range(3*n):
  if i >= n and (i-n) % 2 == 0:
    ans += a[i]
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
A=sorted(A)
ans=0
for i in range(N,2*N):
  ans+=A[i]
print(ans)

Failing test case input:
10
1000000000 1000100000 0000000000 0000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000010 1000000000 1000000000 1000010000 1000000000 1000000000 1100000000 0000100000 1000000000 1000000000 1000000000 1000000000 1000000000 1100100000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000

Expected output:
10100010000


Actual output:
10000000000


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
A=sorted(A)
ans=0
for i in range(N,3*N,2):
  ans+=A[i]
print(ans)

Problem: p03767
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
a = sorted(a,reverse=True)
ans = a[n:n+n]

print(sum(ans))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1100000110 1010000001 1100110000 1000011000 1011000000 1101100011 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10332442214


Actual output:
10032344414


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
a.sort()
ans = 0
for i in range(n, n * 3, 2):
    ans += a[i]
print(ans)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
a=[int(i) for i in input().split()]
a.sort(reverse=True)
print(sum(a[int(len(a)/3):int(2*len(a)/3)]))

Failing test case input:
10
1000000000 1000100000 0000000001 0000000000 0000000000 1000000000 1000000000 0000000000 1000000000 1010000000 1000000010 1000000000 1000000000 1000011000 1000000000 1000000000 1100000000 0000100100 1000000000 1000000000 1000000001 1000000000 1000000000 1100100000 1001000000 1000000000 1000000001 1000000000 1000000000 1100000000

Expected output:
10110100011


Actual output:
10000000000


Fixed submission (verdict: Accepted):
N=int(input())
a=[int(i) for i in input().split()]
a.sort(reverse=True)
ans=0
for i in range(N):
    ans+=a[i*2+1]
print(ans)

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
arr = list(map(int, input().split()))
ans = 0
for i in range(N,2*N):
    ans += arr[i]
print(ans)

Failing test case input:
10
1000000000 1000100000 0000000001 0000001000 0000000000 1000000000 1000000000 0000000000 1000100000 1010000000 1000000010 1010000000 1000010000 1000011000 1010000000 1000000000 1100000000 0001100100 1000000000 1100000001 1000000001 1000000000 1010000000 1100100000 1001000100 1000000000 1000000001 1000000000 1000000000 1110000000

Expected output:
10220211011


Actual output:
9221121111


Fixed submission (verdict: Accepted):
N = int(input())
arr = sorted(list(map(int, input().split())))
ans = 0
count =  0
for i in range(N,3*N):
    if count % 2 == 0:
        ans += arr[i]
    count += 1
print(ans)

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = [int(_) for _ in input().split()]
a.sort()
print(sum(a[n:2*n]))


Failing test case input:
10
1100000000 0000100100 1100100011 0100001000 1000101001 1000001000 1010100000 1010001100 1000100000 1010100000 1000000110 1010000001 1000110000 1000011000 1011000000 1101100011 0100110000 0001100101 1000000000 1001000111 1000000011 1000110001 0010000110 1100000001 1001010100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10232433214


Actual output:
10012454214


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(_) for _ in input().split()]
a.sort()
print(sum(a[n:3*n:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=sorted(list(map(int,input().split())))
for i in range(n):
    del a[0]
    del a[-1]
print(sum(a))

Failing test case input:
10
1000000000 1000100000 0000000000 0000000000 1000000000 1000000000 1000000000 0000000000 1000000000 1000000000 1000000010 1000000000 1000000000 1000010000 1000000000 1000000000 1100000000 0000100100 1000000000 1000000000 1000000001 1000000000 1000000000 1100100000 1001000000 1000000000 1000000000 1000000000 1000000000 1000000000

Expected output:
10100100010


Actual output:
10000000000


Fixed submission (verdict: Accepted):


n=int(input())
a=sorted(list(map(int,input().split())))
r=3*n-1
cnt=0
for l in range(n):
    cnt+=a[r-1]
    r-=2
print(cnt)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))

A.sort()
print(sum(A[N:2*N]))

Failing test case input:
2
0 7 8 9 1 5

Expected output:
13


Actual output:
12


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))

A.sort()
print(sum(A[N::2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
print(sum(sorted(map(int,input().split()))[n:2*n]))

Failing test case input:
10
1100000000 0000100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010001100 1000000000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101000111 1010000101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001000 1000001000 1000000000 1000000100

Expected output:
10333323335


Actual output:
10022247413


Fixed submission (verdict: Accepted):
n=int(input())
print(sum(sorted(map(int,input().split()))[n::2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
aa = list(map(int,input().split()))
aa.sort()
print(sum(aa[n:2*n]))

Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000000001 1000001000 1000000000 1100000100 1000100000 1010100000 1000101110 1010000000 1000010000 1000011000 1010000000 1000000000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000000 1100100000 1001000100 1000001000 1000000001 1000000000 1000000000 1110000100

Expected output:
10222322101


Actual output:
10000334112


Fixed submission (verdict: Accepted):
n = int(input())
aa = list(map(int,input().split()))
aa.sort(reverse = True)

print(sum(aa[1:2*n:2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))

a.sort()

print(sum(a[n:2*n]))


Failing test case input:
10
1100000000 0010100100 1100110011 0100001000 1000101011 1000001000 1010100000 1010000110 1000000000 1010100000 0100000010 1011000001 1100110000 1001011000 1011100000 1101000001 0100110000 0111110101 1000000000 1101001111 1010100101 1000110001 0010000110 0100100001 1001011100 1000011000 1110001010 1001001000 1000000000 1000000100

Expected output:
10333343334


Actual output:
10023346322


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))

a.sort()

print(sum(a[n::2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
A=list(map(int,input().split()))
A.sort()
ans=0
for i in range(N):
  ans+=A[N+i]
print(ans)

Failing test case input:
2
0 7 8 9 1 5

Expected output:
13


Actual output:
12


Fixed submission (verdict: Accepted):
N=int(input())
A=list(map(int,input().split()))
A.sort()
ans=0
for i in range(N):
  ans+=A[N*3-2-i*2]
print(ans)