Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lis = []
for i in range(n):
    a = int(input())
    if a not in lis:lis.append(a)
    else:lis.remove(a)
print(len(lis))

Fixed submission:
n = int(input())
lis = set()
for i in range(n):
    a = int(input())
    if a not in lis:lis.add(a)
    else:lis.remove(a)
print(len(lis))
Buggy python submission (verdict: Runtime Error):
n = str(input())
lis = [0 for i in range(26)]
ans = 1
for i in range(1,len(n)+1):
  ans += i
  lis[ord(n[i])-"a"] += 1
for i in range(26):
  for k in range(lis[i]-1):
    ans -= (k+1)
print(ans)

Fixed submission:
n = str(input())
lis = [0 for i in range(26)]
ans = 1
for i in range(len(n)):
  ans += i
  lis[ord(n[i])-ord("a")] += 1
for i in range(26):
  for k in range(lis[i]-1):
    ans -= (k+1)
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
R = int(|a-b|)
E = int(|a-c|)
if R > E:
 print("B")
else:
 print("A")

Fixed submission:
a, b, c =map(int,input().split())
import math
if abs(a-b) > abs(a-c):
 print("B")
else:
 print("A")

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if |a-b| > |a-c|:
 print("B")
else:
 print("A")

Fixed submission:
a, b, c =map(int,input().split())
import math
if abs(a-b) > abs(a-c):
 print("B")
else:
 print("A")
Buggy python submission (verdict: Runtime Error):
a = input()
A = a[0]
B = a[2]
if A == B:
 print(Yes)
else:
 print(No)

Fixed submission:
N = input()
A = int(N[0])
B = int(N[1])
C = int(N[2])
if A==C:
 print("Yes")
else:
 print("No")

Buggy python submission (verdict: Runtime Error):
a = input()
b = int(a[0])
c = int(a[2])
if b = c:
 print("Yes")
else:
 print("No")


Fixed submission:
N = input()
A = int(N[0])
B = int(N[1])
C = int(N[2])
if A==C:
 print("Yes")
else:
 print("No")

Buggy python submission (verdict: Runtime Error):
a = input()
b = int(a[0])
c = int(a[2])
if b = c:
print("Yes")
else:
print("No")


Fixed submission:
N = input()
A = int(N[0])
B = int(N[1])
C = int(N[2])
if A==C:
 print("Yes")
else:
 print("No")

Buggy python submission (verdict: Runtime Error):
a = input()
b = a[0]
c = a[2]
if b = c:
print("Yes")
else:
print("No")


Fixed submission:
N = input()
A = int(N[0])
B = int(N[1])
C = int(N[2])
if A==C:
 print("Yes")
else:
 print("No")

Buggy python submission (verdict: Runtime Error):
a = (input())
b = a[0]
c = a[2]
if b = c:
print("Yes")
else:
print("No")


Fixed submission:
N = input()
A = int(N[0])
B = int(N[1])
C = int(N[2])
if A==C:
 print("Yes")
else:
 print("No")

Buggy python submission (verdict: Runtime Error):
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
if A == C:
 print("Yes")
else:
 print("No")

Fixed submission:
N = input()
A = int(N[0])
B = int(N[1])
C = int(N[2])
if A==C:
 print("Yes")
else:
 print("No")
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input())
print(min(b,d)-max(a,c))

Fixed submission:
a,b,c,d = map(int,input().split())
lisa = []
lisb = []
for n in range((b-a)+1):
  lisa.append(n + a)
for m in range((d-c)+1):
  lisb.append(m + c)
ans = 0
for i in range(101):
  if i in lisa and i in lisb:
    ans += 1
if ans > 0:
  print(ans-1)
else:
  print(ans)
Buggy python submission (verdict: Runtime Error):
h,w=map(int,input().split())
n=int(input())
lis=list(map(int,input().split()))
ans=[]
cnt=0
s=""
hh=0
for i in range(n):
  for j in range(lis[i]):
    if hh==0:
      s=s+str(i+1)+" "
    else:
      s=str(i+1)+" "+s
    cnt+=1
    if cnt==w:
      ans.append(s)
      s=""
      cnt=0
      hh=(hh+1)%2
for i in range(h):
  print(ans[i])


Fixed submission:
n = int(input())
cou1 = 0
cou2 = 0
cou4 = 0
lis = list(map(int,input().split()))
for i in range(n):
    if lis[i] % 2 == 0:
        if lis[i] % 4 == 0:
            cou4 += 1
        else:
            cou2 += 1
    else:
        cou1 += 1
if cou2 == 0:
    if cou1 <= cou4 + 1:
        print("Yes")
    else:
        print("No")
else:
    if cou1 <= cou4:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
a = int(input())
print("ABC"+a)

Fixed submission:
a = input()
print("ABC"+a)
Buggy python submission (verdict: Runtime Error):
n , k = map(int,input().split())
lis = list(map(int,input().split()))
lis = sorted(lis,reverse = True)
ans = 0
for i in range(k):
  ans += lis[i]
print(ans)

Fixed submission:
a , b = map(int,input().split())
if a%3 == 0 or b%3 == 0 or (a+b)%3 == 0:
 print("Possible")
else:
 print("Impossible")
Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = list(map(int,input().split()))
li = lis[::2]
l = lis[1::2]

if n % 2 == 0:
  l = l[::-1]
  ans = l+li
  print(" ".join(ans))
else:
  li = li[::-1]
  ans = li+l
  print(" ".join(ans))

Fixed submission:
n = int(input())
lis = []
li = list(map(str,input().split()))
if n % 2 == 0:
    b = li[1::2]
    for m in range(n//2):lis.append(b[-(m + 1)])
    print(" ".join(lis[::] + li[::2]))
else:
    b = li[::2]
    for m in range((n//2)+1):lis.append(b[-(m + 1)])
    print(" ".join(lis[::]+li[1::2]))

Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = list(map(int,input().split()))
li =[]
cou = 0
key = 0
if n % 2 == 1:
  while cou < n:
    if key == 0:
      li.insert(0,lis[cou])
      cou += 1
      key = 1
    else:
      li.append(lis[cou])
      cou += 1
      key = 0
else:
  while cou < n:
    if key == 0:
      li.append(lis[cou])
      cou += 1
      key = 1
    else:
      li.insert(0,lis[cou])
      cou += 1
      key = 0
print(" ".join(li))

Fixed submission:
n = int(input())
lis = []
li = list(map(str,input().split()))
if n % 2 == 0:
    b = li[1::2]
    for m in range(n//2):lis.append(b[-(m + 1)])
    print(" ".join(lis[::] + li[::2]))
else:
    b = li[::2]
    for m in range((n//2)+1):lis.append(b[-(m + 1)])
    print(" ".join(lis[::]+li[1::2]))
Buggy python submission (verdict: Time Limit Exceeded):
from functools import reduce

def nCr(N,a,mod):
    if a == 0:return 1
    num = reduce(lambda x,y:x * y % mod,range(N,N-a,-1))
    den = reduce(lambda x,y:x * y % mod,range(1,a+1))
    return num * pow(den,mod-2,mod)%mod

def nHr(n,a,mod):
    return nCr(n-1+a,n-1,mod)

mod = 10 ** 9 + 7

n = int(input())
lis = list(map(int,input().split()))
li = [-1] * n

for i in range(n+1):
    if li[lis[i]-1] != -1:
        left = li[lis[i]-1]+1
        right = i+1
        break
    else:li[lis[i]-1] = i

for k in range(1,n+2):
  #     print(nCr(n+1,k,mod),nCr(left+n-right,k-1,mod))
    print(nCr(n+1,k,mod)-nCr(left+n-right,k-1,mod))


Fixed submission:
def cmb(N, r, mod):
    if ( r<0 or r>N ):
        return 0
    r = min(r, N-r)
    return g1[N] * g2[r] * g2[N-r] % mod

g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル
mod = 10 ** 9 + 7

n = int(input())
lis = list(map(int,input().split()))
li = [-1] * n

for i in range( 2, n + 2 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

for i in range(n+1):
    if li[lis[i]-1] != -1:
        left = li[lis[i]-1]+1
        right = i+1
        break
    else:li[lis[i]-1] = i

for k in range(1,n+2):
  #     print(nCr(n+1,k,mod),nCr(left+n-right,k-1,mod))
    ans = cmb(n+1,k,mod)-cmb(left+n-right,k-1,mod)
    if ans < 0:
        ans += mod
    print(ans)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if c-b <= 0:
 print("delicious")
elif a+b => c:
 print("safe")
else:
 print("dangerous")

Fixed submission:
a, b, c = map(int,input().split())
if c-b <= 0:
 print("delicious")
elif a+b >= c:
 print("safe")
else:
 print("dangerous")

Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if c-b <=0:
 print("delicious")
elif a+b=>c:
 print("safe")
else:
 print("dangerous")

Fixed submission:
a, b, c = map(int,input().split())
if c-b <= 0:
 print("delicious")
elif a+b >= c:
 print("safe")
else:
 print("dangerous")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
lis = [1]
cou = 0
ans = 0
bo = []
for i in range(n):
    bo.append(int(input()))
for i in range(n):
    a = bo[cou]
    if a not in lis:
        lis.append(a)
    else:
        print("-1")
        break
    cou = a-1
    ans += 1
    if a == 2:
        print(ans)
        break

Fixed submission:
n = int(input())
lis = []
p = 1
s = -1
for i in range(n):lis.append(int(input()))
for m in range(n):
    p = lis[p-1]
    if p == 2:
        s = m + 1
        break
print(s)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
if abs(n - m) >= 2:
  print("0")
else:
  if n == m:cou = 2
  else:cou = 1
  while n > 1:
    cou *= n
    cou %= (10 ** 9 + 7)
    n -= 1
  while m > 1:
    cou *= m
    cou %= (10 ** 9 + 7)
    m -= 1
print(cou)

Fixed submission:
n,m = map(int,input().split())
if abs(n - m) >= 2:
  print("0")
else:
  if n == m:cou = 2
  else:cou = 1
  while n > 1:
    cou *= n
    cou %= (10 ** 9 + 7)
    n -= 1
  while m > 1:
    cou *= m
    cou %= (10 ** 9 + 7)
    m -= 1
  print(cou)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
if abs(n - m) >= 2:
  print("0")
else:
  cou = 2
  while n > 1:
    cou *= n
    cou %= (10 ** 9 + 7)
    n -= 1
  while m > 1:
    cou *= m
    cou %= (10 ** 9 + 7)
    m -= 1
print(cou)

Fixed submission:
n,m = map(int,input().split())
if abs(n - m) >= 2:
  print("0")
else:
  if n == m:cou = 2
  else:cou = 1
  while n > 1:
    cou *= n
    cou %= (10 ** 9 + 7)
    n -= 1
  while m > 1:
    cou *= m
    cou %= (10 ** 9 + 7)
    m -= 1
  print(cou)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = list(int,input().split())
print(max(lis)-min(lis))

Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
print(max(lis)-min(lis))
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
lis = []
cou = 0
ans = 0
li = list(map(int,input().split()))
for i in range(n):
    if li[i] >= 3200:
        cou += 1
    else:
        if math.floor(li[i] / 400) not in lis:
            ans += 1
print(ans,min(8,ans + cou))

Fixed submission:
n = int(input())
s = input()
cnt = [0, 0]
add = [0, 0]
ans = ''
for i in range(n):
    if s[i] == ')':
        cnt[0] += 1
        if cnt[0] > cnt[1]:
            add[1] += 1
            cnt[1] += 1
    else:
        cnt[1] += 1

print('(' * add[1] + s + ')'*(cnt[1] -cnt[0]))
Buggy python submission (verdict: Runtime Error):
n = int(input())
li = []
for i in range(n):li.append(int(input())
if sum(li) % 10 == 0:print("0")
else:print(sum(li))

Fixed submission:
n = int(input())
li = []
for i in range(n):li.append(int(input()))
li.sort()
if sum(li) % 10 == 0:
    for k in range(n):
        if (sum(li)-li[k]) % 10 != 0:
            print(sum(li)-li[k])
            exit()
else:
    print(sum(li))
    exit()
print("0")
Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
lis = [int(input()) for i in range(n)]
more = a-b

def tansaku(x):
  cou = 0
  normal = b * x
  for hp in lis:
    r = hp -normal
    if r <= 0:continue
    cou += r // more
    
    if r % more != 0:
      cou += 1
  return cnt <= t

left = 1
right = max(lis)
while right - left > 1:
  mid = (right + left)/2
  if tansaku(mid):
    right = mid
  else:
    left = mid
print(right)

Fixed submission:
n,a,b = map(int,input().split())
lis = [int(input()) for i in range(n)]
more = a-b

def tansaku(x):
  cou = 0
  normal = b * x
  for hp in lis:
    r = hp -normal
    if r <= 0:continue
    cou += r // more
    
    if r % more != 0:
      cou += 1
  return cou <= x

left = 1
right = max(lis)
while right - left > 1:
  mid = (right + left)//2
  if tansaku(mid):
    right = mid
  else:
    left = mid
print(right)

Buggy python submission (verdict: Runtime Error):
n,a,b = map(int,input().split())
lis = [int(input()) for i in range(n)]
more = a-b

def tansaku(x):
  cou = 0
  normal = b * x
  for hp in lis:
    r = hp -normal
    if r <= 0:continue
    cou += r // more
    
    if r % ab != 0:
      cou += 1
  return cnt <= t

left = 1
right = max(lis)
while right - left > 1:
  mid = (right + left)/2
  if tansaku(mid):
    right = mid
  else:
    left = mid
print(right)

Fixed submission:
n,a,b = map(int,input().split())
lis = [int(input()) for i in range(n)]
more = a-b

def tansaku(x):
  cou = 0
  normal = b * x
  for hp in lis:
    r = hp -normal
    if r <= 0:continue
    cou += r // more
    
    if r % more != 0:
      cou += 1
  return cou <= x

left = 1
right = max(lis)
while right - left > 1:
  mid = (right + left)//2
  if tansaku(mid):
    right = mid
  else:
    left = mid
print(right)
Buggy python submission (verdict: Runtime Error):
a, b = map(int,input().split())
if a == 1,3,5,7,8,10:
 if b == 3,5,7,8,10,12:
   print("Yes")
 else:
   print("No")
elif a == 4,6,9:
 if b == 6,9,11:
  print("Yes")
 else:
  print("No")
else:
 print("No")

Fixed submission:
a,b = map(int,input().split())
listA =[1,3,5,7,8,10,12]
listB =[4,6,9,11]
if a in listA and b in listA:
 print("Yes")
elif a in listB and b in listB:
 print("Yes")
else:
 print("No")
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n,m = map(int,input().split())
lis = []
il = set()
key = 0
for i in range(n):
    a,b = map(int,input().split())
    lis.append(a)
    lis.append(b)
    il.add(a)
    il.add(b)
for h in range(len(il)):
    try:
        if lis.count(h+1) % 2 == 1:
            print("NO")
            key = 1
            break
    except:
        continue
if key == 0:
    print("YES")

Fixed submission:
from collections import Counter

n, q = map(int, input().split())
c = Counter()
for _ in range(q):
    u, v = map(int, input().split())
    c[u] += 1
    c[v] += 1

safe = all(c[x] % 2 == 0 for x in c)
print('YES' if safe else 'NO')
Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = list(map(int,input().split()))
cou = 0
co = 0
ans1 = 0
ans2 = 0
for i in range(n):
  cou += lis[i]
  co += lis[i]
  if cou <= 0 and i % 2 == 0:
    ans1 += (1 -cou)
    cou = 1
  if cou => 0 and i % 2 == 1:
    ans1 += (cou +1)
    cou = -1
  if co => 0 and i % 2 == 0:
    ans2 += (co +1)
    co = -1
  if co <= 0 and i % 2 == 1:
    ans2 += (1 -co)
    co = 1
print(min(ans1,ans2))

Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
cou = 0
co = 0
ans1 = 0
ans2 = 0
for i in range(n):
  cou += lis[i]
  co += lis[i]
  if cou <= 0 and i % 2 == 0:
    ans1 += (1 -cou)
    cou = 1
  if cou >= 0 and i % 2 == 1:
    ans1 += (cou +1)
    cou = -1
  if co >= 0 and i % 2 == 0:
    ans2 += (co +1)
    co = -1
  if co <= 0 and i % 2 == 1:
    ans2 += (1 -co)
    co = 1
print(min(ans1,ans2))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
ans = 1
for i in range(1,n+1):ans*=i
print((ans)%((10**9) +7))

Fixed submission:
n = int(input())
ans = 1
for i in range(1,n+1):ans=(ans*i)%(10**9 + 7)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
i = 1
q = 1
for a in range(a):
 i = i*q
 q = q+1
 w = i%(10**9+7)
print(w)

Fixed submission:
n = int(input())
ans = 1
for i in range(1,n+1):ans=(ans*i)%(10**9 + 7)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
i = 1
q = 1
for a in range(a):
 i = i*q
 q = q+1
w = i%(10**9+7)
print(w)

Fixed submission:
n = int(input())
ans = 1
for i in range(1,n+1):ans=(ans*i)%(10**9 + 7)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
a = int(input())
i = 1
q = 1
for a in range(1,a+1):
 i = i*q
 a = a+1
 q = q+1
w = i%(10**9+7)
print(w)

Fixed submission:
n = int(input())
ans = 1
for i in range(1,n+1):ans=(ans*i)%(10**9 + 7)
print(ans)
Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = list(map(int, input().split()))
key = lis[0]
num = [0]
li = [key]
for i in range(1,n):
	if lis[i] > key:
		line = lis[i]
		num.append(i)
		li.append(line)
m = len(li)
nu = [li[0]]+[li[i+1]-li[i] for i in range(m-1)]
he = [0]*m
cou = [0]*m
from bisect import bisect_left
for k in lis:
	sen = bisect_left(li,k)
	cou[sen] += k -li[sen]
	he[sen] += 1
t = 0
for i in reversed(range(m)):
	t += he[i]
	he[i] = t
for i in range(m):cou[i] += he[i]*nu[i]
ans = [0]*n
for i,c in zip(num,cou):ans[i] = c
for r in ans:print(r)

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

key = lis[0]
num = [0]
li = [key]
for i in range(1,n):
	if lis[i] > key:
		key = lis[i]
		num.append(i)
		li.append(key)

m = len(li)
nu = [li[0]]+[li[i+1]-li[i] for i in range(m-1)]

he = [0]*m
cou = [0]*m

from bisect import bisect_left

for k in lis:
	sen = bisect_left(li,k)
	cou[sen] += k -li[sen]
	he[sen] += 1

key = 0
for i in reversed(range(m)):
	key += he[i]
	he[i] = key

for i in range(m):
	cou[i] += he[i]*nu[i]

ans = [0]*n
for i,c in zip(num,cou):
	ans[i] = c

for r in ans:
	print(r)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lis=list(map(int,input().split()))
num=(n*(n+1))//2
if sum(lis)%num!=0:
  print("NO")
  exit()
ans=0
for i in range(n):
  if abs(lis[i]-lis[i-1]-sum(lis)//num)%n!=0:
    print("NO")
    exit()
  ans+=abs(lis[i]-lis[i-1]-sum(lis)//num)//n
if ans == sum(lis)//num:print("YES")
else:print("NO")


Fixed submission:
n=int(input())
lis=list(map(int,input().split()))
num=(n*(n+1))//2
ll=sum(lis)
if ll%num!=0:
  print("NO")
  exit()
ans=0
for i in range(n):
  if abs(lis[i]-lis[i-1]-ll//num)%n!=0:
    print("NO")
    exit()
  ans+=abs(lis[i]-lis[i-1]-ll//num)//n
if ans == ll//num:print("YES")
else:print("NO")

Buggy python submission (verdict: Runtime Error):
n=int(input())
lis=list(map(int,input().split()))
num=(n*(n+1))//2
if sum(lis)%num!=0:
  print("NO")
  exit()
ans=0
for k in range(n):
  if -(lis[i]-lis[i-1]-sum(lis)//num)%n!=0:
    print("NO")
    exit()
  ans+=-(lis[i]-lis[i-1]-sum(lis)//num)//n
if ans == sum(lis)//num:print("YES")
else:print("NO")


Fixed submission:
n=int(input())
lis=list(map(int,input().split()))
num=(n*(n+1))//2
ll=sum(lis)
if ll%num!=0:
  print("NO")
  exit()
ans=0
for i in range(n):
  if abs(lis[i]-lis[i-1]-ll//num)%n!=0:
    print("NO")
    exit()
  ans+=abs(lis[i]-lis[i-1]-ll//num)//n
if ans == ll//num:print("YES")
else:print("NO")

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
lis=list(map(int,input().split()))
num=(n*(n+1))//2
if sum(lis)%num!=0:
  print("NO")
  exit()
li=[lis[i]-lis[i-1]-sum(lis)//num for i in range(n)]
ans=0
for k in range(n):
  if -li[k]%n!=0:
    print("NO")
    exit()
  ans+=-li[k]//n
if ans == sum(lis)//num:print("YES")
else:print("NO")


Fixed submission:
n=int(input())
lis=list(map(int,input().split()))
num=(n*(n+1))//2
ll=sum(lis)
if ll%num!=0:
  print("NO")
  exit()
ans=0
for i in range(n):
  if abs(lis[i]-lis[i-1]-ll//num)%n!=0:
    print("NO")
    exit()
  ans+=abs(lis[i]-lis[i-1]-ll//num)//n
if ans == ll//num:print("YES")
else:print("NO")

Buggy python submission (verdict: Runtime Error):
n=int(input())
lis=list(map(int,input.split()))
num=(n*(n+1))//2
if sum(lis)%num!=0:
  print("No")
  exit()
li=[lis[i]-lis[i-1]-sum(lis)//num for i in range(n)]
ans=0
for k in range(n):
  if -li[k]%n!=0:
    print("No")
    exit()
  ans+=-li[k]//n
if ans == sum(lis)//num:print("Yes")
else:print("No")

Fixed submission:
n=int(input())
lis=list(map(int,input().split()))
num=(n*(n+1))//2
ll=sum(lis)
if ll%num!=0:
  print("NO")
  exit()
ans=0
for i in range(n):
  if abs(lis[i]-lis[i-1]-ll//num)%n!=0:
    print("NO")
    exit()
  ans+=abs(lis[i]-lis[i-1]-ll//num)//n
if ans == ll//num:print("YES")
else:print("NO")
Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = list(map(int,input().split()))
ans = set()
for num in lis:ans.add(num)
print(len(ans)-((len(ans) % 2)+1)%2)

Fixed submission:
import math
n = int(input())
print(2 * (n // 11) + math.ceil((n % 11) / 6))
Buggy python submission (verdict: Runtime Error):
n = int(input())
lis = list(map(int,input().split()))
ans = set()
for num in lis:ans.add(num)
print(len(num)-((len(num) % 2)+1)%2)

Fixed submission:
n = int(input())
lis = list(map(int,input().split()))
s = set()
for i in range(n):s.add(lis[i])
lis.sort()
if (len(lis)-len(s)) % 2 == 1:
	print(len(s)-1)
else:
	print(len(s))
Buggy python submission (verdict: Runtime Error):
a = input().spulit()
A = int(a[0])
B = int(a[1])
C = int(a[2])
D = int(a[3])
q = A*B
w = C*D
if q <= w:
 print(w)
else:
 print(q)

Fixed submission:
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
D = int(a[3])
q = A*B
w = C*D
if q <= w:
 print(w)
else:
 print(q)

Buggy python submission (verdict: Runtime Error):
a = input().spulit()
A = int(a[0])
B = int(a[1])
C = int(a[2])
D = int(a[3])
if A*B <= C*D:
 print(C*D)
else:
 print(A*B)

Fixed submission:
a = input().split()
A = int(a[0])
B = int(a[1])
C = int(a[2])
D = int(a[3])
q = A*B
w = C*D
if q <= w:
 print(w)
else:
 print(q)
Buggy python submission (verdict: Runtime Error):
a,b,c = map(str(input().split(",")))
print(a,b,c)

Fixed submission:
a = input()
A =a[0]+a[1]+a[2]+a[3]+a[4]
B =a[6]+a[7]+a[8]+a[9]+a[10]+a[11]+a[12]
C =a[14]+a[15]+a[16]+a[17]+a[18]
print(A,B,C)

Buggy python submission (verdict: Runtime Error):
a = input()
a[5] = " "
a[13] = " "
print(a[0]+a[1]+a[2]+a[3]+a[4]+a[5]+a[6]+a[7]+a[8]+a[9]+a[10]+a[11]+a[12]+a[13]+a[14]+a[15]+a[16]+a[17]+a[18])

Fixed submission:
a = input()
A =a[0]+a[1]+a[2]+a[3]+a[4]
B =a[6]+a[7]+a[8]+a[9]+a[10]+a[11]+a[12]
C =a[14]+a[15]+a[16]+a[17]+a[18]
print(A,B,C)
Buggy python submission (verdict: Time Limit Exceeded):
k, s = map(int,input().split())
ans = 0
x = 0
y = 0
z = 0
for i in range(k+1):
    y = 0
    for n in range(k+1):
        z = 0
        for m in range(k+1):
            if x + y + z == s:
                ans += 1
            z += 1
        y += 1
    x += 1
print(ans)

Fixed submission:
k, s = map(int,input().split())
x = 0
y = 0
z = 0
ans = 0
for i in range(k+1):
    for n in range(k+1):
        z = s - (i + n)
        if 0 <= z and z <= k:
            ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
k, s = map(int,input().split())
ans = 0
x = 0
y = 0
z = 0
for i in range(k):
    for n in range(k):
        for m in range(k):
            if x + y + z = s:
                ans += 1
            z += 1
        y += 1
    x += 1
print(ans)

Fixed submission:
k, s = map(int,input().split())
x = 0
y = 0
z = 0
ans = 0
for i in range(k+1):
    for n in range(k+1):
        z = s - (i + n)
        if 0 <= z and z <= k:
            ans += 1
print(ans)
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
ans = 0
if abs(y) > abs(x):
  if x < 0:ans += 1
  if y < 0:ans += 1
  ans += (abs(y)-abs(x))
else:
  if x > 0:ans += 1
  if y > 0:ans += 1
  ans += (abs(x)-abs(y))
print(ans)

Fixed submission:
x,y = map(int,input().split())
ans = 0
if abs(y) > abs(x):
  if x < 0:ans += 1
  if y < 0:ans += 1
  ans += (abs(y)-abs(x))
else:
  if x > 0:ans += 1
  if y > 0:ans += 1
  ans += (abs(x)-abs(y))
print(ans)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
cou = 0
if n != 0 and m != 0:
  if n / m < 0:
    cou += 1
    n *= (-1)
  elif n < 0 and m < 0:
    cou += 2
    n *= (-1)
    m *= (-1)
  else:
    continue
print(cou + abs(n-m))
    


Fixed submission:
x,y = map(int,input().split())
ans = 0
if abs(y) > abs(x):
  if x < 0:ans += 1
  if y < 0:ans += 1
  ans += (abs(y)-abs(x))
else:
  if x > 0:ans += 1
  if y > 0:ans += 1
  ans += (abs(x)-abs(y))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n,k = map(int,input().split())
lis = list(map(int,input().split()))
num = 0
ans = 0
for i in range(n):num += max(0,lis[i])
li = [0 for i in range(n-k+1)]
for i in range(n-k+1):
  cou = 0
  co = 0
  for nu in lis[i:i+k]:
    if nu >= 0:cou += nu
    else:co -= nu
  if cou >= co:ans = max(ans,num-co)
  else:ans = max(ans,num-cou)
print(ans)

Fixed submission:
n,k = map(int,input().split())
lis = list(map(int,input().split()))
num = 0
ans = 0
cou = 0
co = 0
for i in range(n):num += max(0,lis[i])
li = [0 for i in range(n-k+1)]
for i in range(k-1):
  cou += max(0,lis[i])
  co += max(0,-lis[i])
for i in range(n-k+1):
  cou += max(0,lis[i+k-1])
  co += max(0,-lis[i+k-1])
  if cou >= co:ans = max(ans,num-co)
  else:ans = max(ans,num-cou)
  cou -= max(0,lis[i])
  co -= max(0,-lis[i])
print(ans)