Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import collections
import math

N = int(input())
S = list(input())

count = collections.Counter(S)
c_value = list(count.values())
con = c_value[0]*c_value[1]*c_value[2]

for i in range(N):
    for j in range(i+1, int(math.ceil((N+i)/2))):
        if S[i] != S[j]:
            if S[i] != S[j + (j - i)] and S[j] != S[j + (j - i)]:
                con -= 1

print(con)


Fixed submission:
import collections
import math

N = int(input())
S = list(input())

if 'R' in S and 'G'in S and 'B' in S:
    count = collections.Counter(S)
    c_value = list(count.values())
    con = c_value[0]*c_value[1]*c_value[2]
else:
    con = 0

for i in range(N):
    for j in range(i+1, int(math.ceil((N+i)/2))):
        if S[i] != S[j]:
            if S[i] != S[j + (j - i)] and S[j] != S[j + (j - i)]:
                con -= 1

print(con)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = list(input())

S_R = S.count('R')
S_B = S.count('B')
S_G = S.count('G')

con = S_R * S_B * S_G

for i in range(N):
    for j in range(i+1, N):
        if S[i] != S[j] and j + (j - i) < len(S):
            if S[i] != S[j + (j - i)] and S[j] != S[j + (j - i)]:
                con -= 1

print(con)


Fixed submission:
import collections
import math

N = int(input())
S = list(input())

if 'R' in S and 'G'in S and 'B' in S:
    count = collections.Counter(S)
    c_value = list(count.values())
    con = c_value[0]*c_value[1]*c_value[2]
else:
    con = 0

for i in range(N):
    for j in range(i+1, int(math.ceil((N+i)/2))):
        if S[i] != S[j]:
            if S[i] != S[j + (j - i)] and S[j] != S[j + (j - i)]:
                con -= 1

print(con)
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

num = [0] * N

P = [list(map(int,input().split())) for i in range(M)]

for i in range(M + 1):
    if i == M:
        if N == 1:
            print("".join([str(n) for n in num]))
            break
        elif num[0] == 0:
            num[0] = 1
            print("".join([str(n) for n in num]))
            break
        else:
            print("".join([str(n) for n in num]))
            break
    elif P[i][0] == 1 and P[i][1] == 0:
        if N == 1:
            continue
        else:
            print(-1)
            break
    elif num[P[i][0] - 1] == 0 or num[P[i][0] - 1] == P[i][1]:
        num[P[i][0] - 1] = P[i][1]
    else:
        print(-1)
        break



Fixed submission:
import math

N = int(input())
print(math.ceil(N / 2))
Buggy python submission (verdict: Runtime Error):
N, M = map(int, input().split())

A = [[0] * 2 for i in range(M)]

for i in range(M):
    A[i][0], A[i][1] = input().split()


AC = [0] * M
WA = [0] * M

for j in range(M)[::-1]:
    if A[j][1] == 'AC' and (A[j][0] in AC) is False:
        AC[j] = A[j][0]
    elif A[j][1] == 'WA' and (A[j][0] in AC) is True:
        WA[j] = A[j][0]

print(len(AC) - AC.count(0), len(WA) - WA.count(0))


Fixed submission:
C = input()

L = list('abcdefghijklmnopqrstuvwxyz')

for i in range(26):
    if C == L[i]:
        print(L[i + 1])
        break
Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

A = [[0] * 2 for k in range(M)]

for i in range(M):
    A[i][0], A[i][1] = input().split()

AC = [0] * M
WA = 0

for j in range(M)[::-1]:
    if A[j][1] == 'AC' and (A[j][0] in AC) is False:
        AC[j] = A[j][0]
    elif A[j][1] == 'WA' and (A[j][0] in AC) is True:
        WA += 1

print(len(AC) - AC.count(0), WA)


Fixed submission:
N, M = map(int, input().split())

submit = [input().split() for i in range(M)]
ans = [[0, 0] for i in range(N)]

for i in range(M):
    tmp = int(submit[i][0]) - 1
    if submit[i][1] == 'AC' and ans[tmp][0] == 0:
        ans[tmp][0] += 1
    elif submit[i][1] == 'WA' and ans[tmp][0] == 0:
        ans[tmp][1] += 1

print(sum(ans[i][0] for i in range(N)), sum(ans[i][1] for i in range(N) if ans[i][0] == 1))

Buggy python submission (verdict: Time Limit Exceeded):
N, M = map(int, input().split())

A = [[0] * 2 for i in range(M)]

for i in range(M):
    A[i][0], A[i][1] = input().split()


AC = [0] * M
WA = [0] * M

for j in range(M)[::-1]:
    if A[j][1] == 'AC' and (A[j][0] in AC) is False:
        AC[j] = A[j][0]
    elif A[j][1] == 'WA' and (A[j][0] in AC) is True:
        WA[j] = A[j][0]

print(len(AC) - AC.count(0), len(WA) - WA.count(0))


Fixed submission:
N, M = map(int, input().split())

submit = [input().split() for i in range(M)]
ans = [[0, 0] for i in range(N)]

for i in range(M):
    tmp = int(submit[i][0]) - 1
    if submit[i][1] == 'AC' and ans[tmp][0] == 0:
        ans[tmp][0] += 1
    elif submit[i][1] == 'WA' and ans[tmp][0] == 0:
        ans[tmp][1] += 1

print(sum(ans[i][0] for i in range(N)), sum(ans[i][1] for i in range(N) if ans[i][0] == 1))
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = list(input())

count = 0

if N >= 3:
    for i in range(N - 1):
        if S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
           count += 1
    print(count)
else:
    print(0)



Fixed submission:
N = int(input())
S = list(input())

count = 0

if N >= 3:
    for i in range(N - 1):
        if (i + 2) < N and S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
           count += 1
    print(count)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = list(input())

count = 0
for i in range(N - 1):
    if S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
        count += 1

print(count)



Fixed submission:
N = int(input())
S = list(input())

count = 0

if N >= 3:
    for i in range(N - 1):
        if (i + 2) < N and S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
           count += 1
    print(count)
else:
    print(0)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = list(input())

count = 0
for i in range(N - 1):
    if S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
        count += 1

print(count)


Fixed submission:
N = int(input())
S = list(input())

count = 0

if N >= 3:
    for i in range(N - 1):
        if (i + 2) < N and S[i] == 'A' and S[i + 1] == 'B' and S[i + 2] == 'C':
           count += 1
    print(count)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
print(int(A * B / math.gcd(A, B)))


Fixed submission:
import fractions
A, B = map(int, input().split())
print(int(A * B / fractions.gcd(A, B)))

Buggy python submission (verdict: Runtime Error):
import math

A, B = map(int, input().split())

print(int(A * B / math.gcd(A, B)))

Fixed submission:
import fractions
A, B = map(int, input().split())
print(int(A * B / fractions.gcd(A, B)))

Buggy python submission (verdict: Runtime Error):
import math

A, B = map(int, input().split())

print(math.gcd(A, B))

Fixed submission:
import fractions
A, B = map(int, input().split())
print(int(A * B / fractions.gcd(A, B)))
Buggy python submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
print(int(A * B / math.gcd(A, B)))


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
count = 0
now = 1

for i in range(len(A)):
    if A[i] == now:
        now += 1
    else:
        count += 1

print(count if now != 1 else -1)
Buggy python submission (verdict: Runtime Error):
print(sum([int(list(input().split())[i]) for i in range(3)]))

Fixed submission:
A1, A2, A3 = map(int, input().split())
if A1+A2+A3 >= 22:
  print('bust')
else:
  print('win')
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
claim = []
MAX = 0

for i in range(N):
    A = int(input())
    claim.append([input().split() for i in range(A)])

for i in range(2 ** N):
    people = [0 for i in range(N)]
    FLAG = True
    for j in range(N):  
        if ((i >> j) & 1):  
            people[j] = 1

    c = [claim[i] for i in range(N) if people[i] == 1]
    
    for k in range(len(c)):
        for l in range(len(c[k])):
            if people[int(c[k][l][0]) - 1] != int(c[k][l][1]):
                FLAG = False
    
    if FLAG:
        MAX = max(MAX, sum(people))

print(MAX)

Fixed submission:
N = int(input())
claim = []
MAX = 0

for i in range(N):
    A = int(input())
    claim.append([input().split() for i in range(A)])

for i in range(2 ** N):
    people = [0 for i in range(N)]
    FLAG = True
    for j in range(N):  
        if ((i >> j) & 1):  
            people[j] = 1
    
    for k in range(len(claim)):
        if people[k] == 0:
            continue
        for l in range(len(claim[k])):
            if people[int(claim[k][l][0]) - 1] != int(claim[k][l][1]):
                FLAG = False
                break
    
    if FLAG:
        MAX = max(MAX, sum(people))

print(MAX)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(input().split())
A = [int(a[i])for i in range(N)]
frag = [0 for i in range(60)]
mod = 10 ** 9 + 7

for i in range(N):
    for j in range(len(bin(A[i])) - 2):
        if A[i] & (1 << j):
            frag[j] += 1

print(sum([(frag[i] * (N - frag[i]) * 2 ** i) % mod for i in range(60)]) % mod)

Fixed submission:
N = int(input())
a = list(input().split())
A = [int(a[i])for i in range(N)]
frag = [0 for i in range(60)]
mod = 10 ** 9 + 7
ans = 0

for i in range(60):
    j = 1 << i
    cnt = sum((k & j) >> i for k in A)
    ans += (cnt * (N - cnt)) << i
    ans %= mod
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = list(input().split())
A = [int(a[i])for i in range(N)]
frag = [0 for i in range(60)]
mod = 10 ** 9 + 7

for i in range(N):
    for j in range(len(bin(A[i])) - 2):
        if A[i] & (1 << j):
            frag[j] += 1

print(sum([(frag[i] * (N - frag[i]) * 2 ** i) for i in range(60)]) % mod)

Fixed submission:
N = int(input())
a = list(input().split())
A = [int(a[i])for i in range(N)]
frag = [0 for i in range(60)]
mod = 10 ** 9 + 7
ans = 0

for i in range(60):
    j = 1 << i
    cnt = sum((k & j) >> i for k in A)
    ans += (cnt * (N - cnt)) << i
    ans %= mod
    
print(ans)
Buggy python submission (verdict: Runtime Error):
mport numpy as np

N = int(input())
Stu = list(input().split())
Stu2 = [int(i) for i in Stu]
print(Stu2)

x = np.argsort(Stu2)
print(x)
for i in range(N):
    Stu[i] = x[i] + 1

print(' '.join(map(str, Stu)))


Fixed submission:
import numpy as np

N = int(input())
Stu = list(input().split())
Stu2 = [int(i) for i in Stu]

x = np.argsort(Stu2)
for i in range(N):
    Stu[i] = x[i] + 1

print(' '.join(map(str, Stu)))
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter

N = int(input())
S = [list(input()) for i in range(N)]
ana_list = []
ana_count = []
count = 0

for i in range(N):
    tmp = Counter(S[i])
    if tmp in ana_list:
        count += ana_count[ana_list.index(tmp)]
        ana_count[ana_list.index(tmp)] += 1
    else:
        ana_list.append(Counter(S[i]))
        ana_count.append(1)

print(count)

Fixed submission:
from collections import Counter

N = int(input())
S = list(sorted([sorted(input()) for i in range(N)]))
mini_count = 0
count = 0
tmp = S[0]

for i in range(1, N):
    if tmp == S[i]:
        mini_count += 1
        count += mini_count
    else:
        tmp = S[i]
        mini_count = 0

print(count)
Buggy python submission (verdict: Runtime Error):
import math

A, B, C, D = map(int, input().split())
lcm = C * D // math.gcd(C, D)

count = 0
div_C = B // C - math.ceil(A / C) + 1
div_D = B // D - math.ceil(A / D) + 1
div_C_D = B // lcm - math.ceil(A / lcm) + 1


print(B - A + 1 - div_C - div_D + div_C_D)


Fixed submission:
import math
import fractions

A, B, C, D = map(int, input().split())
lcm = C * D // fractions.gcd(C, D)

count = 0
if A % C == 0:
    div_C = B // C - A // C + 1
else:
    div_C = B // C - A // C

if A % D == 0:
    div_D = B // D - A // D + 1
else:
    div_D = B // D - A // D

if A % lcm == 0:    
    div_C_D = B // lcm - A // lcm + 1
else:
    div_C_D = B // lcm - A // lcm

print(B - A + 1 - div_C - div_D + div_C_D)

Buggy python submission (verdict: Time Limit Exceeded):
A, B, C, D = map(int, input().split())

count = 0
for i in range(A, B+1):
    if i % C != 0 and i % D != 0:
        count += 1

print(count)


Fixed submission:
import math
import fractions

A, B, C, D = map(int, input().split())
lcm = C * D // fractions.gcd(C, D)

count = 0
if A % C == 0:
    div_C = B // C - A // C + 1
else:
    div_C = B // C - A // C

if A % D == 0:
    div_D = B // D - A // D + 1
else:
    div_D = B // D - A // D

if A % lcm == 0:    
    div_C_D = B // lcm - A // lcm + 1
else:
    div_C_D = B // lcm - A // lcm

print(B - A + 1 - div_C - div_D + div_C_D)
Buggy python submission (verdict: Runtime Error):
N, Q = map(int, input().split())
S = input()
query = [input().split() for i in range(Q)]
AC = [0 for i in range(N)]

for i in range(N):
    if S[i] == 'A' and S[i+1] == 'C':
        AC[i] = 1

for i in range(Q):
    L, R = int(query[i][0]), int(query[i][1])
    if S[R-1] == 'A':
        print(sum(AC[L-1:R-1]))
    else:
        print(sum(AC[L-1:R]))

Fixed submission:
N, Q = map(int, input().split())
S = input()
query = [input().split() for i in range(Q)]
AC = [0 for i in range(N+1)]

for i in range(N):
    AC[i+1] = AC[i] + (1 if S[i:i+2] == 'AC' else 0)

for i in range(Q):
    L, R = int(query[i][0]), int(query[i][1])
    print(AC[R-1] - AC[L-1])

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()
query = [input().split() for i in range(Q)]

for i in range(Q):
    print(S[int(query[i][0])-1:int(query[i][1])].count('AC'))


Fixed submission:
N, Q = map(int, input().split())
S = input()
query = [input().split() for i in range(Q)]
AC = [0 for i in range(N+1)]

for i in range(N):
    AC[i+1] = AC[i] + (1 if S[i:i+2] == 'AC' else 0)

for i in range(Q):
    L, R = int(query[i][0]), int(query[i][1])
    print(AC[R-1] - AC[L-1])

Buggy python submission (verdict: Time Limit Exceeded):
N, Q = map(int, input().split())
S = input()
query = [input().split() for i in range(Q)]

for i in range(Q):
    tmp = S[int(query[i][0])-1:int(query[i][1])]
    print(len([i for i in range(len(tmp)-1) if tmp[i] == 'A' and tmp[i+1] == 'C']))

Fixed submission:
N, Q = map(int, input().split())
S = input()
query = [input().split() for i in range(Q)]
AC = [0 for i in range(N+1)]

for i in range(N):
    AC[i+1] = AC[i] + (1 if S[i:i+2] == 'AC' else 0)

for i in range(Q):
    L, R = int(query[i][0]), int(query[i][1])
    print(AC[R-1] - AC[L-1])
Buggy python submission (verdict: Runtime Error):
import flactions

N = int(input())
A = list(input().split())
monster = list(sorted([int(A[i]) for i in range(N)]))
ans = float('inf')
MIN = monster[0]

for i in range(N):
    tmp = monster[i]
    ans = min(ans, int(flactions.gcd(tmp, MIN)))

print(ans)

Fixed submission:
import fractions

N = int(input())
A = list(input().split())
monster = list(sorted([int(A[i]) for i in range(N)]))
ans = float('inf')
MIN = monster[0]

for i in range(N):
    tmp = monster[i]
    ans = min(ans, int(fractions.gcd(tmp, MIN)))

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, K= map(int, input().split())

h = list(sorted([int(input()) for i in range(N)]))
ans = float('inf')

for i in range(N-K+1):
    tmp = h[i:i+K]
    ans = min(ans, tmp[-1] - tmp[0])

print(ans)


Fixed submission:
N, K= map(int, input().split())

h = list(sorted([int(input()) for i in range(N)]))
h_dif = [h[i+K-1] - h[i] for i in range(N-K+1)]
print(min(h_dif))
Buggy python submission (verdict: Time Limit Exceeded):
import sys

N, X = map(int, input().split())
x = list(input().split())
city = [int(x[i]) for i in range(N)]
MAX = min([abs(city[i] - X) for i in range(N)])

for j in reversed(range(MAX)):
    tmp = [abs(X - city[i]) % (j+1) for i in range(N)]
    if max(tmp) == 0:
        print(j+1)
        sys.exit()

Fixed submission:
import sys
import math

N, X = map(int, input().split())
x = list(input().split())
city = [abs(int(x[i]) - X) for i in range(N)]
MAX = min(city)
candidate = []
for i in range(int(math.sqrt(MAX)+1)):
    if MAX % (i+1) == 0:
        candidate.append(i+1)
        candidate.append(MAX // (i+1))

candidate = list(sorted(candidate, reverse=True))

for j in range(len(candidate)):
    ans = candidate[j]
    tmp = [city[i] % ans for i in range(N)]
    if max(tmp) == 0:
        print(ans)
        sys.exit()
Buggy python submission (verdict: Runtime Error):
A, B, K = map(int, input().split())
candidate1 = [i for i in range(A, A+K) if i <= B]
candidate2 = [i+1 for i in range(B-K, B) if i+1 >= A]

ans = list(sorted(list(set(candidate1+candidate2))))
ans = [str(ans[i]) for i in range(len(candidate2) + len(candidate1))]

print('\n'.join(ans))

Fixed submission:
A, B, K = map(int, input().split())
candidate1 = [i for i in range(A, A+K) if i <= B]
candidate2 = [i+1 for i in range(B-K, B) if i+1 >= A]

ans = list(sorted(list(set(candidate1+candidate2))))
ans = [str(ans[i]) for i in range(len(ans))]

print('\n'.join(ans))

Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = map(int, input().split())

for i in range(A, B+1):
    if i - A + 1 <= K or B - i + 1 <= K:
        print(i)
    else:
        continue

Fixed submission:
A, B, K = map(int, input().split())
candidate1 = [i for i in range(A, A+K) if i <= B]
candidate2 = [i+1 for i in range(B-K, B) if i+1 >= A]

ans = list(sorted(list(set(candidate1+candidate2))))
ans = [str(ans[i]) for i in range(len(ans))]

print('\n'.join(ans))
Buggy python submission (verdict: Runtime Error):
s = sorted(list(input()))
t = sorted(list(input()), reverse = True)

Alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 
         'u', 'v', 'w', 'x', 'y', 'z']

for i in range(len(s)+1):
    if i == len(s):
        if len(t) > len(s):
            print('Yes')
        else:
            print('No')
    elif Alpha.index(s[i]) < Alpha.index(t[i]):
        print('Yes')
        break
    elif Alpha.index(s[i]) > Alpha.index(t[i]):
        print('No')
        break
    else:
        continue



Fixed submission:
s = sorted(list(input()))
t = sorted(list(input()), reverse = True)

Alpha = ['0', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 
         'u', 'v', 'w', 'x', 'y', 'z']

while len(s) != len(t):
    if len(s) > len(t):
        t.append('0')
    else:
        s.append('0')

for i in range(len(s)+1):
    if i == len(s):
        print('No')
    elif Alpha.index(s[i]) < Alpha.index(t[i]):
        print('Yes')
        break
    elif Alpha.index(s[i]) > Alpha.index(t[i]):
        print('No')
        break
    else:
        continue
Buggy python submission (verdict: Runtime Error):
N = int(input())
count = 1
while count ** 2 <= N:
    count += 1

print((count-1)**2)N = int(input())
count = 1
while count ** 2 <= N:
    count += 1

print((count-1)**2)

Fixed submission:
N = int(input())
count = 1
while count ** 2 <= N:
    count += 1

print((count-1)**2)
Buggy python submission (verdict: Runtime Error):
ates = list(input().split())

for i in range(len(rates)):
    rates[i] = int(rates[i]) // 400

MAX = 0
MIN = 0
j = 0
while j <= 8:
    for k in range(N):
        if j != 8 and j == rates[k]:
            MAX += 1
            MIN += 1
            break
        elif j == 8 and j <= rates[k]:
            MAX += 1
            if MIN == 0:
                MIN = 1
            continue
    j += 1

print(MIN, MAX)


Fixed submission:
N = int(input())
rates = list(input().split())

for i in range(len(rates)):
    rates[i] = int(rates[i]) // 400

MAX = 0
MIN = 0
j = 0
while j <= 8:
    for k in range(N):
        if j != 8 and j == rates[k]:
            MAX += 1
            MIN += 1
            break
        elif j == 8 and j <= rates[k]:
            MAX += 1
            if MIN == 0:
                MIN = 1
                continue
            continue
    j += 1

print(MIN, MAX)
Buggy python submission (verdict: Time Limit Exceeded):
import math

N = int(input())
A_lis = list(input().split())
r = 10 ** 9 + 7
count = 2 ** (int(math.floor(N/2)))

for i in range(N):
    if N % 2 == i % 2:
        if A_lis.count(str(i)) != 0:
            count = 0
            break
        else:
            continue
    else:
        if i == 0:
            if A_lis.count(str(i)) == 1:
                continue
            else:
                count = 0
                break
        elif A_lis.count(str(i)) != 2:
            count = 0
            break
        else:
            continue
        
print(count)


Fixed submission:
import numpy as np
from collections import Counter
mo = 1000000007
r = range
 
n = int(input())
a = np.array(list(map(int, input().split())))
 
c = Counter(a.tolist())
 
if n % 2 == 1 and (0 not in c or c[0] != 1): print(0); exit();
 
for i in r(n//2):
    x = i * 2 + (1 if n % 2 == 0 else 2)
    if x not in c or c[x] != 2: print(0); exit();
 
print(2 ** (n//2) % mo)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A_lis = list(input().split())
count = 1
r = 10 ** 9 + 7

for i in range(N):
    if N % 2 == i % 2:
        if A_lis.count(str(i)) != 0:
            count = 0
            break
        else:
            continue
    else:
        if i == 0:
            if A_lis.count(str(i)) == 1:
                continue
            else:
                count = 0
                break
        elif A_lis.count(str(i)) != 2:
            count = 0
            break
        else:
            count = (count * 2) % r
            continue
        
print(count)


Fixed submission:
import numpy as np
from collections import Counter
mo = 1000000007
r = range
 
n = int(input())
a = np.array(list(map(int, input().split())))
 
c = Counter(a.tolist())
 
if n % 2 == 1 and (0 not in c or c[0] != 1): print(0); exit();
 
for i in r(n//2):
    x = i * 2 + (1 if n % 2 == 0 else 2)
    if x not in c or c[x] != 2: print(0); exit();
 
print(2 ** (n//2) % mo)
Buggy python submission (verdict: Runtime Error):
andy = list(map(int, input().split()))

S = sorted(candy, reverse = True)
if S[0] == S[1] + S[2]:
    print("Yes")
else:
    print("No")

Fixed submission:
candy = list(map(int, input().split()))

S = sorted(candy, reverse = True)
if S[0] == S[1] + S[2]:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a, b, h = map(int, input().split())

S = (a + b) * h // 2

print(S)

Fixed submission:
a,b,h=map(int,open(0));print((a+b)*h//2)

Buggy python submission (verdict: Runtime Error):
a, b, h = map(int, input().split())

S = (a + b) * h /2

print(S)

Fixed submission:
a,b,h=map(int,open(0));print((a+b)*h//2)

Buggy python submission (verdict: Runtime Error):
a, b, h = map(int, input().split())

S = (a + b) * h /int(2)

print(S)

Fixed submission:
a,b,h=map(int,open(0));print((a+b)*h//2)

Buggy python submission (verdict: Runtime Error):
a, b, h = map(int, input().split())

S = (a + b) * h /int(2)

print(S)

Fixed submission:
a,b,h=map(int,open(0));print((a+b)*h//2)

Buggy python submission (verdict: Runtime Error):
a, b, h = map(int, input().split())

S = int((a + b) * h /2)

print(S)

Fixed submission:
a,b,h=map(int,open(0));print((a+b)*h//2)