ZhenlongDai/ACPR huggingface dataset:
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
xs = [int(c) for c in input().strip().split()]

ans = 0
for i in range(n):
  ans += xs[2 * i - 1]
print(ans)

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:
7243424413


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

Problem: p03767
Buggy submission (Python (3.8.2), 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
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:
10002534321


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

Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
ai=list(map(int,input().split()))
ai.sort()
ans1=ai[N:]
ans2=ans1[:N]

print(ans1)
print(ans2)

print(sum(ans2))

Failing test case input:
2
2 2 8 5 1 5

Expected output:
7


Actual output:
[2, 5, 5, 8]
[2, 5]
7


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

l2=l1[1::2]
ans=l2[:N]
print(sum(ans))

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

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

inp.sort()
inp.reverse()

i=0
ans = 0
while(i<N):
    ans += inp[i+1]
    i += 1

print(ans)


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:
10231321000


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

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

inp.sort()
inp.reverse()

i=0
count=0
ans = 0
while(count<N):
    ans += inp[i+1]
    i += 2
    count += 1

print(ans)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input_lines = str(input())
input_lines2 = str(input())

n = int(input_lines)
aAry = input_lines2.split(' ')
aAry = map(int,aAry)
aAry = sorted(aAry)
print(aAry)

answer1 = 0
for i in range(n):
    answer1 += int(aAry[(-i-1)*2])

print(answer1)

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:
[100100, 10000110, 11110101, 100000010, 100001000, 100110000, 1000000000, 1000000000, 1000000001, 1000000100, 1000001000, 1000001000, 1000011000, 1000100000, 1000101001, 1000110001, 1001000111, 1001011000, 1001011100, 1010000001, 1010001100, 1010100000, 1010100000, 1011100000, 1100000000, 1100000001, 1100001001, 1100110000, 1100110011, 1101100011]
10322336324


Fixed submission (verdict: Accepted):
input_lines = str(input())
input_lines2 = str(input())

n = int(input_lines)
aAry = input_lines2.split(' ')
aAry = map(int,aAry)
aAry = sorted(aAry)


answer1 = 0
for i in range(n):
    answer1 += int(aAry[(-i-1)*2])

print(answer1)

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

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(input())
    A = [int(x) for x in input().split()]

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

    

if __name__ == '__main__':
    main()



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 1100000001 1000000000 1000000000 1010000100

Expected output:
10231423311


Actual output:
10012333201


Fixed submission (verdict: Accepted):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(input())
    A = [int(x) for x in input().split()]

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

    print(ans)


    

if __name__ == '__main__':
    main()

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

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

Expected output:
10221321213


Actual output:
10001333212


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

array = sorted(array, reverse=True)
s = n
e = 2 * n
print(sum(array[int(s)::2]))

Failing test case input:
2
-2 0 8 -1 -23 1

Expected output:
0


Actual output:
-2


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

array = sorted(array, reverse=True)
print(sum(array[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):
    ans +=a[i+n]
print(ans)

Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000001001 1000001000 1000100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000000 1100000000 1001000100 1000001000 1100000001 1000000000 1000000000 1110000100

Expected output:
10322222111


Actual output:
10002433101


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

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(sorted(list(map(int,input().split())))[::-1])
ans = 0
print(a)
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 1000110001 1010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331423323


Actual output:
[1101100010, 1101000111, 1100100011, 1100001001, 1100000001, 1100000000, 1010100000, 1010100000, 1010000110, 1010000100, 1010000000, 1010000000, 1001000100, 1000110001, 1000110000, 1000101110, 1000100100, 1000100000, 1000011000, 1000011000, 1000001100, 1000001001, 1000001000, 1000001000, 1000000011, 1000000000, 1000000000, 100110000, 100001000, 1100100]
10021543311


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

a_list.sort(reverse=True)

sum = 0
for i in range(2, 2+N, 1):
    sum += a_list[i]

print(sum)

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:
10111111012


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

a_list.sort(reverse=True)

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

print(sum)

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

Failing test case input:
2
-2 2 8 -1 -28 0

Expected output:
1


Actual output:
2


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

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
print(A)
for i in range(2*N):
    if i%2==1:
        ans+=A[i]
print(ans)


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:
[1101100011, 1100100011, 1100001001, 1100000001, 1100000000, 1011000000, 1010100000, 1010100000, 1010001100, 1010000100, 1010000001, 1001010100, 1001000111, 1000110001, 1000110000, 1000101001, 1000100000, 1000011000, 1000011000, 1000001000, 1000001000, 1000000110, 1000000011, 1000000000, 1000000000, 100110000, 100001000, 10000110, 1100101, 100100]
10232433214


Fixed submission (verdict: Accepted):

N = int(input())
A = list(map(int,input().split()))
A.sort(reverse=True)
ans = 0
for i in range(2*N):
    if i%2==1:
        ans+=A[i]
print(ans)

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

nums = sorted(list(map(int, input().split())))

print(nums)
res = 0
for i in range(N):
    res += nums[3 * N - 2 * (i+1)]

print(res)

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

Expected output:
10


Actual output:
[1, 1, 2, 4, 8, 9]
10


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

nums = sorted(list(map(int, input().split())))

res = 0
for i in range(N):
    res += nums[3 * N - 2 * (i+1)]

print(res)
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[1:2*n+2:2]))

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

Expected output:
10233633212


Actual output:
11233633212


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 (PyPy3 (2.4.0), 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 1100100011 0100001000 1000001001 1000001000 1010100000 1010001100 1000100000 1010100000 1000101110 1010000000 1000110000 1000011000 1011000000 1101100010 0100110000 0001100100 1000000000 1101000111 1000000011 1000110001 0010000110 1100000001 1001000100 1000011000 1100001001 1000001000 1000000000 1010000100

Expected output:
10331325324


Actual output:
10021444312


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

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

n = int(input())
s = list(map(int, input().split()))
score = sorted(s, reverse=True)



print(sum(score[n:n + 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 1101001111 1010100101 1000110001 0010000110 0100000001 1001011100 1000011000 1110001010 1000001000 1000000000 1000000100

Expected output:
10333325334


Actual output:
10022347312


Fixed submission (verdict: Accepted):

n = int(input())
s = list(map(int, input().split()))
score = sorted(s, reverse=True)
ans = 0

for i in range(n):
    ans += score[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(0, 2*n, 2)]))

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

Expected output:
12


Actual output:
9


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 (Python (3.4.3), verdict: Wrong Answer):
s=int(input())
i= list(map(int, input().split()))
 
i.sort(reverse=True)
sun=0
ks=0
for j in range(s):
    sun+=i[j+1]
for j in range(s,2*s):
  ks+=i[j]
print(max(sun,ks))

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

Expected output:
10231323211


Actual output:
10451401222


Fixed submission (verdict: Accepted):
s=int(input())
i= list(map(int, input().split()))
i.sort(reverse=True)
sum=0
for j in range(s):
    sum+=i[(2*j)+1]
print(sum)

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

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:
3210210011


Fixed submission (verdict: Accepted):
n=int(input())
*a,=map(int,input().split())
a.sort()
a.reverse()
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()
print(sum(A[N:2 * N + 1]))

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

Expected output:
10323532224


Actual output:
11022447302


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())
l = input().split()
l.sort()
l = map(int, l)
l = list(l)
S = 0
for i in range(N):
    S += l[N + 2 * i]
print(S) 

Failing test case input:
2
-2 0 8 -1 -23 1

Expected output:
0


Actual output:
-22


Fixed submission (verdict: Accepted):
N = int(input())
l = input().split()
l = map(int, l)
l = list(l)
l.sort()
S = 0
for i in range(N):
    S += l[N + 2 * i]
print(S)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
input_lines = str(input())
input_lines2 = str(input())

n = int(input_lines)
aAry = input_lines2.split(' ')
aAry = sorted(aAry)

answer = 0
for i in range(n):
    answer += int(aAry[(-i-1)*2])

print(answer)

Failing test case input:
2
-2 0 8 -1 -23 0

Expected output:
-1


Actual output:
-23


Fixed submission (verdict: Accepted):
input_lines = str(input())
input_lines2 = str(input())

n = int(input_lines)
aAry = input_lines2.split(' ')
aAry = map(int,aAry)
aAry = sorted(aAry)


answer1 = 0
for i in range(n):
    answer1 += int(aAry[(-i-1)*2])

print(answer1)

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

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

Failing test case input:
2
0 -1 9 8 3 0

Expected output:
8


Actual output:
3


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(lambda x: int(x), 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.sort()


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

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:
6011321010


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





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

a.sort()


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

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def main():
    N = int(input())
    A = [int(a) for a in input().split()]
    A = sorted(A)
    ans = 0
    for i in range(N):
        ans += A[N+i]
    print(ans)

if __name__ == "__main__":
    main()

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

Expected output:
10222312201


Actual output:
10000435111


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

if __name__ == "__main__":
    main()
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
print(sum(sorted([int(x) for x in input().strip().split()])[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())
print(sum(sorted([int(x) for x in input().strip().split()], reverse=True)[1:2*N:2]))

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

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

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:
10012454213


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

a.sort(reverse=True)

b = a[1::2]

print(sum(b[:N]))

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

a.sort()
s = 0

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

print(s)


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

Expected output:
10221321213


Actual output:
9101121102


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

a.sort(reverse=True)
s = 0

for i in [n*2-1 for n in range(1,N +1)]:
    s += a[i]

print(s)

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

N = int(input())
d = list(map(int,input().split(" ")))
d.sort(reverse = True)
_ans = []
for i in range(N-1):
    _ans.append(d[2*i+1])
print(sum(_ans))


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

Expected output:
10222411102


Actual output:
9222410101


Fixed submission (verdict: Accepted):

N = int(input())
d = list(map(int,input().split(" ")))
d.sort(reverse = True)
_ans = []
for i in range(N):
    _ans.append(d[2*i+1])
print(sum(_ans))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = input()
alist = list(map(int, input().split()))
alist.sort(reverse=True)
print(alist[::2])


Failing test case input:
10
1000000000 1000100000 1100100011 0000001000 1000001001 1000001000 1000100000 1000000100 1000100000 1010100000 1100101110 1010000000 1000010000 1000011000 1010000000 1001100000 0100000000 0001100100 1000000000 1101000000 1000000001 1000010000 1010000000 1100000000 1001000100 1000001000 1100000001 1000100000 1000000000 1110000100

Expected output:
10322311112


Actual output:
[1110000100, 1100101110, 1100000001, 1010100000, 1010000000, 1001100000, 1000100000, 1000100000, 1000011000, 1000010000, 1000001000, 1000000100, 1000000000, 1000000000, 1100100]


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

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(i) for i in input().split()]

A.sort()
print(sum(A[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())
A = [int(i) for i in input().split()]

A.sort(reverse=True)
print(sum(A[1:2 * N:2]))

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

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 1000001000 1000000000 1000000100

Expected output:
10333324344


Actual output:
11654534566


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 = [int(i) for i in input().split()]
s_sort = sorted(a, reverse=True)
score = 0
for i in range(1, 3*N, 2):
    score += s_sort[i]
print(score)

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:
12432735543


Fixed submission (verdict: Accepted):
N = int(input())
a = [int(i) for i in input().split()]
s_sort = sorted(a, reverse=True)
score = 0
for i in range(1, 2*N, 2):
    score += s_sort[i]
print(score)
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
if __name__ == '__main__':
    n = int(input())
    alist = [int(i) for i in input().split()]
    alist.sort(reverse=True)
    print(alist)
    st = 0
    for i in range(n):
        st += alist[2*i+1]
    print(st)


Failing test case input:
10
1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000 1000000000

Expected output:
10000000000

Actual output:
[1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000, 1000000000]
10000000000


Fixed submission (verdict: Accepted):
if __name__ == '__main__':
    n = int(input())
    alist = [int(i) for i in input().split()]
    alist.sort(reverse=True)
    st = 0
    for i in range(n):
        st += alist[2*i+1]
    print(st)

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

a.sort()

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

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

Expected output:
10222312201


Actual output:
10000435111


Fixed submission (verdict: Accepted):
n = int(input())
a = [int(x) for x in 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(sorted(list(map(int,input().split())))[::-1])
ans = 0
for i in range(n):
  ans += a[n+i]
print(ans)

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

Expected output:
10222312201


Actual output:
10000435111


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

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

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

Expected output:
10231323211


Actual output:
10002433101


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

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

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
member = int(input())
member_array = sorted(list(map(int, input().split())),reverse=True)
result = member_array[1]

for i in range(1,member):

    result += member_array[i+2]

print(result)

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 1110000000

Expected output:
10110200011


Actual output:
10111211012


Fixed submission (verdict: Accepted):
member = int(input())
member_array = sorted(list(map(int, input().split())),reverse=True)
result = 0
count = 1

for i in range(member):
    result += member_array[count]
    count += 2

print(result)

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]

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

print(sum(l))


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:
20341321013


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())
A = list(map(int, input().split()))

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

print(total)

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

Expected output:
10331325225


Actual output:
1101100011


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())
arr=list(map(int,input().split()))
arr=sorted(arr,reverse=True)
ans=0
for i in range(n):
  ans+=arr[1+2*i]

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:

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

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    a_arr = list(map(int,_in[1].split(' ')))
    
    a_arr.sort()
    cnt = sum(a_arr[N:2*N])
    
    print(cnt)


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

Expected output:
10333325334


Actual output:
10022347312


Fixed submission (verdict: Accepted):
from sys import stdin


if __name__ == "__main__":
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    a_arr = list(map(int,_in[1].split(' ')))
    
    a_arr.sort(reverse=True)
    cnt = sum(a_arr[1:2*N:2])
    
    print(cnt)
Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n = int(input())
a = sorted(list(map(int,input().split())))
ans = 0
for i in range(n):
    ans += a[n+i]
print(ans)

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 1000000000

Expected output:
10101011001


Actual output:
10000000000


Fixed submission (verdict: Accepted):
n = int(input())
a = sorted(list(map(int,input().split())),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):
s=int(input())
i= list(map(int, input().split()))
i.sort(reverse=True)
sum=0
for j in range(s):
    sum+=i[(3*j)+1]
print(sum)

Failing test case input:
2
-2 0 8 -1 -23 0

Expected output:
-1


Actual output:
-2


Fixed submission (verdict: Accepted):
s=int(input())
i= list(map(int, input().split()))
i.sort(reverse=True)
sum=0
for j in range(s):
    sum+=i[(2*j)+1]
print(sum)

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(2 * n - 1, n - 1, -1):
    ans += a[i]

print(ans)

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 = 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_list = sorted(a_list)

print(sum(a_list[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 1000100000 1000000000 1110000100

Expected output:
10222311201


Actual output:
10000434111


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

a_list = map(int, input().split())
a_list = sorted(a_list)

print(sum(a_list[N::2]))
Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
data = list(map(int,input().split()))
data = sorted(data, reverse=True)
sum = 0
del data[0]
del data[-1]
sum += data[0]
del data[0]
print(sum)

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

Expected output:
10333434125


Actual output:
1101100011


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

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[::-1][n::2]))

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

Expected output:
10221321213


Actual output:
9001312211


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





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

a.sort()


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

Problem: p03767
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

N = int(input())
a = sorted(map(int, input().split(' ')))

ans = sum(a[N: 2*N])
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:
10002534321


Fixed submission (verdict: Accepted):

N = int(input())
a = sorted(map(int, input().split(' ')), reverse=True)

ans = sum([a[i] for i in range(1, 2 * N, 2)])
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:2*n]))

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

Expected output:
10220311112


Actual output:
10000231002


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int,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())
l = list(map(int, input().split()))
l.sort()
print(sum(l[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())
l = list(map(int, input().split()))
l.sort()
print(sum(l[n::2]))

Problem: p03767
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))
a.sort(reverse = True)
sum1 = sum(a[n:(2*n)])
sum2 = 0
for i in range(3*n):
	if i % 3 == 1:
		sum2 += a[i]
print(max([sum1,sum2]))

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

Expected output:
10322336224


Actual output:
10013345214


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

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=ans+a[2*i-1]
print(ans)

Failing test case input:
2
-2 0 8 -1 -23 1

Expected output:
0


Actual output:
-22


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

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

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 1010000000 1100100000 1001000000 1000000000 1000000001 1000000000 1000000000 1110000000

Expected output:
10111111001


Actual output:
10000000001


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

a = [int(i) for i in input().split()]

a.sort()

total = 0
for i in range(N):
    total += a[N+i]

print(total)

Failing test case input:
10
1100000000 0000100100 1100110011 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:
10232443214


Actual output:
10012454214


Fixed submission (verdict: Accepted):
N = int(input())
a = [int(i) for i in 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 = list(map(int, input().split()))
A_list = sorted(A_list, reverse = True)
A_list1 = A_list[0:2*N]
A_list2 = A_list[2*N:3*N]
print(sum(A_list1[N:2*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_list = list(map(int, input().split()))
A_list = sorted(A_list, reverse = True)
A_list1 = A_list[0:2*N]
A_list2 = A_list[2*N:3*N]
print(sum(A_list1[1:2*N:2]))

Problem: p03767
Buggy submission (Python (3.8.2), 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
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(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())
L=list(map(int,input().split()))

L.sort()
ans=sum(L[N:2*N])
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:
10012454213


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

L.sort()
L=L[N:]
ans=sum(L[::2])
print(ans)
Problem: p03767
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
a = sorted(list(map(int, input().split())))
second = []
ans = 0
for i in range(N, 2*N):
    second.append(a[i])
ans = sum(second)
print(ans)

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:
10000000000


Fixed submission (verdict: Accepted):
N = int(input())
a = sorted(list(map(int, input().split())))
a2 = a[N:]
ans = 0
for i in range(0, 2*N, 2):
    ans += a2[i]
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:1:-2]))

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:
10011323112


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 = map(int, input().split())

a = sorted(a)
m = 0

for i in range(n, 2 * n):
    m += a[i]

print(m)

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 = map(int, input().split())

a = sorted(a, reverse=True)
m = 0

for i in range(1, 2 * n, 2):
    m += a[i]

print(m)

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

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

Expected output:
10231424331


Actual output:
9012212202


Fixed submission (verdict: Accepted):
N = int(input())
total_members = N*3
members = sorted(map(int, input().split()), reverse=True)
total = 0
for i in range(0, N):
    total += members[i * 2 + 1]
print (total)