Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p02837 (python)

Fixed submission:
n = int(input())
words = []
for i in range(n):
	a = int(input())
	w = []
	for _ in range(a):
		x, y = map(int, input().split())
		w.append([x-1, y])
	words.append(w)


ans = 0
for bit in range(1<<n):
  #2のn乗まで捜査
	ok = True
	is_honest = [(bit>>i) & 1 for i in range(n)]
	#bitをiずらして末尾が1のひとは正直
	for i in range(n):
		if not is_honest[i]:
			continue
		for x, y in words[i]:
			if is_honest[x] != y:
				ok = False
	if ok:
		ans = max(ans, sum(is_honest))
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
words = []
for i in range(n):
	a = int(input())
	w = []
	for _ in range(a):
		x, y = map(int, input().split())
		w.append([x-1, y])
	words.append(w)


ans = 0
for bit in range(1<<n):　#2のn乗まで捜査
	ok = True
	is_honest = [(bit>>i) & 1 for i in range(n)]
	#bitをiずらして末尾が1のひとは正直
	for i in range(n):
		if not is_honest[i]:
			continue
		for x, y in words[i]:
			if is_honest[x] != y:
				ok = False
	if ok:
		ans = max(ans, sum(is_honest))
print(ans)

Buggy submission (verdict: Runtime Error):
import sys
def input():
	return sys.stdin.readline()[:-1]
n = int(input())
words = []
for i in range(n):
	a = int(input())
	w = []
	for _ in range(a):
		x, y = map(int, input().split())
		w.append([x-1, y])
	words.append(w)


ans = 0
for bit in range(1<<n):　#2のn乗まで捜査
	ok = True
	is_honest = [(bit>>i) & 1 for i in range(n)]
	#bitをiずらして末尾が1のひとは正直
	for i in range(n):
		if not is_honest[i]:
			continue
		for x, y in words[i]:
			if is_honest[x] != y:
				ok = False
	if ok:
		ans = max(ans, sum(is_honest))
print(ans)
Problem p02848 (python)

Fixed submission:
n = int(input())
s = input()
alfha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in s:
  ans += alfha[(alfha.index(i)+n) % 26]
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = inuput()
alfha = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ans = ''
for i in s:
  a += alfha[(alfha.index(i)+n) % 26]
print(ans)
Problem p02911 (python)

Fixed submission:
n,k,q = map(int,input().split())
A = []
for i in range (q):
  a = int(input())
  A.append(a)
point = [k - q]*n

for i in range(q):
  tmp = A[i] - 1
  point[tmp] += 1

for i in range(n):
    if point[i] > 0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
n,k,q = map(int,input().split())
A = []
for i range in(q):
  a = int(input())
  A.append(a)
point = [k - q]*n

for i range(q):
  tmp = A[i] - 1
  point[tmp] += 1

for i in range(n):
    if point[i] > 0:
        print("Yes")
    else:
        print("No")
Problem p02922 (python)

Fixed submission:
a,b = map(int, input().split())

ans = 0
A = 1
while A < b:
  ans += 1
  A += (a - 1)
print(ans)

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

ans = 0
A = 1
while A < b:
  ans += 1
  s += (a - 1)
print(ans)

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

ans = 0
A  = 1
while A < b:
  ans += 1
  s += a - 1
print(ans)
Problem p02957 (python)

Fixed submission:
a,b = map(int,input().split())
if((a + b) % 2 == 0):
    print((a + b) // 2)
else:
    print('IMPOSSIBLE')

Buggy submission (verdict: Runtime Error):
a,b = map(int,input().split)
if((a + b) % 2 == 0):
    print((a + b) / 2)
else:
    print('IMPOSSIBLE')
Problem p02958 (python)

Fixed submission:
n = int(input())
s = list(map(int,input().split()))
t = 0
for i in range(n):
  s.append(i)

for i in range(n):
  if(s[i] == i + 1):
    t += 0
  else:
    t += 1
if(t == 0 or t == 2):
  print('YES')
else:
  print('NO')

Buggy submission (verdict: Runtime Error):
List = list(map(int, input().split()))
ans = 'YES'
for i in List:
  if(List[i] != List[i+1]):
    ans = 'NO'
    break
print(ans)
Problem p02994 (python)

Fixed submission:
n , l = map(int, input().split())
L = []

for i in range(n):
    L.append(i+l)

if L[0] > 0:
    print(sum(L[1:]))
elif L[0] <=0 and L[-1] >= 0:
    print(sum(L))
else:
    print(sum(L[:-1]))

Buggy submission (verdict: Runtime Error):
n , l = map(int, input().split())
L = []

for i in range(n):
    L.append(i+l)

if L[0] > 0:
    print(sum(L[1:]))
elif L[0] <=0 and L[-1] >= 0:
    print(sum(L))
else:
    print(sum([:-1]))

Buggy submission (verdict: Runtime Error):
n,l = map(int, input().split())
L = [0]*n
#l+i-1
for i in range(n):
  L[i] += l+i

if(l < 0 and n + l < 0):
  print(sum(L) - L[n-1])
elif(l =< 0 and n + l >= 0):
  print(sum(L))
else:
  print(sum(L) - L[0])
Problem p03206 (python)

Fixed submission:
d = int(input())
if(d == 22):
  print('Christmas Eve Eve Eve')
elif(d == 23):
  print('Christmas Eve Eve')
elif(d == 24):
  print('Christmas Eve')
else:
  print('Christmas')

Buggy submission (verdict: Runtime Error):
d = int(input())
if(d == 22):
  print(Christmas Eve Eve Eve)
elif(d == 23):
  print(Christmas Eve Eve)
elif(d == 24):
  print(Christmas Eve)
else:
  print(Christmas)
Problem p03997 (python)

Fixed submission:
a = int(input())
b = int(input())
h = int(input())
print(((a+b)*h)//2)

Buggy submission (verdict: Runtime Error):
a = int(input().split())
b = int(input().split())
h = int(input().split())
print(((a+b)*h)//2)
Problem p02641 (python)

Fixed submission:
x,n=list(map(int, input().split()))
if n!=0:
    p=list(map(int, input().split()))
d=0
t=0
if n==0:
    print(x)
if n!=0:
    while t==0:
        if (x-d) not in p:
            print (x-d)
            t=1
        elif (x+d) not in p:
            print (x+d)
            t=1
        else:
            d+=1

Buggy submission (verdict: Runtime Error):
x,n=list(map(int, input().split()))
if n!=0:
    p=list(map(int, input().split()))
d=0
t=0
while t==0:
    if (x-d) not in p:
        print (x-d)
        t=1
    elif (x+d) not in p:
        print (x+d)
        t=1
    else:
        d+=1
Problem p02691 (python)

Fixed submission:
n=int(input())
a=list(map(int, input().split()))
b=[0]*n
c=[0]*n
for i in range(n):
    b[i]=a[i]+i
    c[i]=i-a[i]
bs=sorted(b)
cs=sorted(c)
lx=[1+10**10]*n
ly=[2+10**10]*n
rx=[3+10**10]*n
ry=[4+10**10]*n

lx[0]=1
ly[0]=bs[0]
rx[0]=1
ry[0]=cs[0]

d=0
e=0
for j in range (1,n):
    if bs[j]==bs[j-1]:
        lx[d]+=1
    else:
        d+=1
        lx[d]=1
        ly[d]=bs[j]
        
for k in range (1,n):
    if cs[k]==cs[k-1]:
        rx[e]+=1
    else:
        e+=1
        rx[e]=1
        ry[e]=cs[k]
x=0
ans=0
for l in range(d):
    while ry[x]<=ly[l] and x<n-1:
        if ry[x]==ly[l]:
            ans+=(lx[l]*rx[x])
            x+=1
        else:
            x+=1
print(ans)

Buggy submission (verdict: Runtime Error):
n=int(input())
a=list(map(int, input().split()))
b=[0]*n
c=[0]*n
for i in range(n):
    b[i]=a[i]+i
    c[i]=i-a[i]
bs=sorted(b)
cs=sorted(c)
lx=[1+10**10]*n
ly=[2+10**10]*n
rx=[3+10**10]*n
ry=[4+10**10]*n

lx[0]=1
ly[0]=bs[0]
rx[0]=1
ry[0]=cs[0]

d=0
e=0
for j in range (1,n):
    if bs[j]==bs[j-1]:
        lx[d]+=1
    else:
        d+=1
        lx[d]=1
        ly[d]=bs[j]
        
for k in range (1,n):
    if cs[k]==cs[k-1]:
        rx[e]+=1
    else:
        e+=1
        rx[e]=1
        ry[e]=cs[k]
x=0
ans=0
for l in range(d):
    while ry[x]<=ly[l]:
        if ry[x]==ly[l]:
            ans+=(lx[l]*rx[x])
            x+=1
        else:
            x+=1
print(ans)
Problem p02702 (python)

Fixed submission:
s=str(input())
n=len(s)
k=[0]*(n+1)
for i in range (1,n+1):
    k[i]=int(s[i-1])
t=[0]*(n+1)
t[0]=0  
for i in range(1,n+1):
    t[i]=(10*t[i-1]+k[i])%2019

p=1
q=[0]*448
for z in range(0,448):
    q[z]=p%2019
    p=10*q[z]

d=[0]*n   
for j in range(1,n+1):
    f=(n-j)%448
    d[j-1]=q[f]*t[j]%2019
ds=sorted(d)
ct=0
ans=0
if ds[0]==0:
    ct=1
    ans=1
for i in range(n-1):
    if ds[i+1]==ds[i]:
        ct+=1
        ans+=ct
    else:
        ct=0
print(ans)

Buggy submission (verdict: Runtime Error):
s=str(input())
n=len(s)
k=[0]*(n+1)
for i in range (1,n+1):
    k[i]=int(s[i-1])
t=[0]*(n+1)
t[0]=0  
for i in range(1,n+1):
    t[i]=(10*t[i-1]+k[i])%2019

p=1
q=[0]*448
for z in range(0,448):
    q[z]=p%2019
    p=10*q[z]

d=[0]*n   
for j in range(1,n+1):
    f=j%448
    d[j-1]=q[n-f]*t[j]%2019
ds=sorted(d)
ct=0
ans=0
if ds[0]==0:
    ct=1
    ans=1
for i in range(n-1):
    if ds[i+1]==ds[i]:
        ct+=1
        ans+=ct
    else:
        ct=0
print(ans)
Problem p02741 (python)

Fixed submission:
N=int(input())
i=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(i[N-1])

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W 
if H==1 or W==1:
    print(1)
elif x%2==0:
    print(x//2)
else:
    print((x+1)//2)
Problem p02742 (python)

Fixed submission:
i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W 
if H==1 or W==1:
    print(1)
elif x%2==0:
    print(x//2)
else:
    print((x+1)//2)

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W 
elif H==1 or W==1:
    print(1)
elif x%2==0:
    print(x//2)
else:
    print((x+1)//2)
Problem p02743 (python)

Fixed submission:
i = list(map(int, input().split()))
a=i[0]
b=i[1]
c=i[2]
if a+b>c:
    print('No')
elif a**2+b**2+c**2<=2*(a*c+a*b+b*c):
    print('No')
else:
    print('Yes')

Buggy submission (verdict: Runtime Error):
i = list(map(int, input().split()))
a=i[0]
b=i[1]
c=i[2]
import math

if a**0.5+b**0.5>c**0.5:
    print('No')
elif(math.isclose(a**0.5+b**0.5,c**0.5)):
    print('No')
else:
    print('Yes')
Problem p02748 (python)

Fixed submission:
i=list(map(int, input().split()))
a=list(map(int, input().split()))
b=list(map(int, input().split()))
A=i[0]
B=i[1]
M=i[2]
x = []
y = []
c = []
for j in range(M):
    x1,y1,c1=[int(j) for j in input().split()]
    x.append(x1)
    y.append(y1)
    c.append(c1)
d=200001
e=100001
f=100001
for k in range (A):
    if a[k]<e:
        e=a[k]

for l in range (B):
    if b[l]<f:
        f=b[l]
d=e+f

for p in range (M):
    if a[x[p]-1]+b[y[p]-1]-c[p]<d:
        d= a[x[p]-1]+b[y[p]-1]-c[p]

print(d)

Buggy submission (verdict: Runtime Error):
i=list(map(int, input().split()))
a=list(map(int, input().split()))
b=list(map(int, input().split()))
A=i[0]
B=i[1]
M=i[2]
x = []
y = []
c = []
for j in range(M):
    x1,y1,c1=[int(j) for j in input().split()]
    x.append(x1)
    y.append(y1)
    c.append(c1)
d=200001
e=100001
f=100001
for k in range (A):
    if a[k]<e:
        e=a[k]

for l in range (B):
    if b[k]<f:
        f=b[k]
d=e+f

for p in range (M):
    if a[x[p]-1]+b[y[p]-1]-c[p]<d:
        d= a[x[p]-1]+b[y[p]-1]-c[p]

print(d)

Buggy submission (verdict: Runtime Error):
i=list(map(int, input().split()))
a=list(map(int, input().split()))
b=list(map(int, input().split()))
A=i[0]
B=i[1]
M=i[2]
x = []
y = []
c = []
for i in range(M):
    x1,y1,c1=[int(i) for i in input().split()]
    x.append(x1)
    y.append(y1)
    c.append(c1)
d=200001
e=100001
f=100001
for k in range (A):
    if a[k]<e:
        e=a[k]

for l in range (B):
    if b[k]<f:
        f=b[k]
d=e+f

for n in range (M):
    if a[x[n]]+b[y[n]]-c[n]<d:
        d= a[x[n]]+b[y[n]]-c[n]
print(d)
Problem p02658 (python)

Fixed submission:
def solve():
    n = int(input())
    a = list(map(int, input().split()))
    if 0 in a:
        print(0)
        return
    x = 1
    for tmp in a:
        x *= tmp
        if x > 1000000000000000000:
            print(-1)
            return
    print(x)

solve()

Buggy submission (verdict: Runtime Error):
def solve():
    n = int(input())
    a = list(map(int, input().split()))
    if 0 in A:
        print(0)
        return
    x = 1
    for tmp in a:
        x *= tmp
        if x > 1000000000000000000:
            print(-1)
            return
    print(x)

solve()
Problem p03091 (python)

Fixed submission:
import sys
sys.setrecursionlimit(100000)

N, M = map(int, input().split())

count = [0] * (N)
E = [[] for _ in range(N)]

for _ in range(M):
    a, b = map(int, input().split())
    E[a - 1].append(b - 1)
    E[b - 1].append(a - 1)
    count[a - 1] += 1
    count[b - 1] += 1

count_sum = 0
count4 = 0
count6 = 0
node = 0

check = [False] * N

for i, temp in enumerate(count):
    if temp % 2 == 1:
        print("No")
        exit()
    else:
        if temp >= 4:
            count4 += 1
            check[i] = True
            node = i
        if temp >= 6:
            count6 += 1
        count_sum += temp

def dfs(v, first, depth):
    global E, check

    ret = 0
    for next_v in E[v]:
        if depth >= 2 and next_v == first:
            return 1
        elif not check[next_v]:
            check[next_v] = True
            ret += dfs(next_v, first, depth + 1)

    return ret

if count4 >= 3 or count6 >= 1:
    print("Yes")
elif count4 == 2:
    ret = dfs(node, node, 0)
    if ret > 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")

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

count = [0] * (N)
E = [[] for _ in range(N)]

for _ in range(M):
    a, b = map(int, input().split())
    E[a - 1].append(b - 1)
    E[b - 1].append(a - 1)
    count[a - 1] += 1
    count[b - 1] += 1

count_sum = 0
count4 = 0
count6 = 0
node = 0

check = [False] * N

for i, temp in enumerate(count):
    if temp % 2 == 1:
        print("No")
        exit()
    else:
        if temp >= 4:
            count4 += 1
            check[i] = True
            node = i
        if temp >= 6:
            count6 += 1
        count_sum += temp

def dfs(v, first, depth):
    global E, check

    ret = 0
    for next_v in E[v]:
        if depth >= 2 and next_v == first:
            return 1
        elif not check[next_v]:
            check[next_v] = True
            ret += dfs(next_v, first, depth + 1)

    return ret

if count4 >= 3 or count6 >= 1:
    print("Yes")
elif count4 == 2:
    ret = dfs(node, node, 0)
    if ret > 0:
        print("Yes")
    else:
        print("No")
else:
    print("No")
Problem p03110 (python)

Fixed submission:
N = int(input())
ans = 0.0
for _ in range(N):
    x, u = input().split()
    if u == "JPY":
        ans += float(x)
    else:
        ans += float(x) * 380000.0
print(ans)

Buggy submission (verdict: Runtime Error):
3
100000000 JPY
100.00000000 BTC
0.00000001 BTC
Problem p03238 (python)

Fixed submission:
n = int(input())

if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a + b)

Buggy submission (verdict: Runtime Error):
import sys

n = int(input())

xyh = [list(map(int, sys.stdin.readline().split())) for _ in range(n)]

isOk = False
i = 0
j = 0
constant = -1

for i in range(101):
    for j in range(101):

        constant = -1
        for xyhTemp in xyh:
            if xyhTemp[2] != 0:
                temp = xyhTemp[2] + abs(i - xyhTemp[0]) + abs(j - xyhTemp[1])

                if constant == -1:
                    constant = temp

                if constant != temp:
                    break
        else:

            for p in xyh:
                if p[2] == 0 and constant - abs(i - p[0]) - abs(j - p[1]) > 0:
                    break
            else:
                isOk = True
                break
        
    if isOk:
        break

print(i, j, constant)

Buggy submission (verdict: Runtime Error):
n = int(input())

xyh = [list(map(int, input().split())) for _ in range(n)]

isOk = False
i = 0
j = 0
constant = -1

for i in range(101):
    for j in range(101):

        constant = -1
        for xyhTemp in xyh:
            if xyhTemp[2] != 0:
                temp = xyhTemp[2] + abs(i - xyhTemp[0]) + abs(j - xyhTemp[1])

                if constant == -1:
                    constant = temp

                if constant != temp:
                    break
        else:

            for p in xyh:
                if p[2] == 0 and constant - abs(i - p[0]) - abs(j - p[1]) > 0:
                    break
            else:
                isOk = True
                break
        
    if isOk:
        break

print(i, j, constant)
Problem p03239 (python)

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

ans = 100000
for i in range(N):
    c, t = list(map(int, input().split()))
    if t <= T and c <= ans:
        ans = c

if ans == 100000:
    print("TLE")
else:
    print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())

xyh = []

for i in range(n):
    xyh.append(list(map(int, input().split())))

isOk = False
i = 0
j = 0
constant = -1

for i in range(101):
    for j in range(101):

        constant = -1
        for xyhTemp in xyh:
            if xyhTemp[2] != 0:
                temp = xyhTemp[2] + abs(i - xyhTemp[0]) + abs(j - xyhTemp[1])

                if constant == -1:
                    constant = temp

                if constant != temp:
                    break
        else:

            for p in xyh:
                if p[2] == 0 and constant - abs(i - p[0]) - abs(j - p[1]) > 0:
                    break
            else:
                isOk = True
                break
        
    if isOk:
        break

print(i, j, constant)
Problem p03287 (python)

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

sumList = [0] * n
sumList[0] = a[0] % m
number = {}
number[sumList[0]] = 0

for i in range(1, n):
    sumList[i] = (sumList[i - 1] + a[i]) % m
    number[sumList[i]] = 0

for i in range(n):
    number[sumList[i]] += 1

ans = 0

for key, value in number.items():
    ans += value * (value - 1) // 2
    if key == 0:
        ans += value

print(ans)

Buggy submission (verdict: Runtime Error):
n, m = map(int, input().split())
a = list(map(int, input().split()))

sumList = [0] * n
sumList[0] = a[0] % m
number = {}

for i in range(1, n):
    sumList[i] = (sumList[i - 1] + a[i]) % m
    number[sumList[i]] = 0

for i in range(n):
    number[sumList[i]] += 1

ans = 0

for key, value in number.items():
    ans += value * (value - 1) // 2
    if key == 0:
        ans += value

print(ans)
Problem p03297 (python)

Fixed submission:
import sys

sys.setrecursionlimit(100000)

def gcd(a, b):
    r = a % b
    if r == 0:
        return b
    else:
        return gcd(b, r)

T = int(input())
for i in range(T):
    a, b, c, d = list(map(int, input().split()))

    if a < b:
        print("No")
        continue

    if b > d:
        print("No")
        continue

    if c >= b: # d >= b
        print("Yes")
        continue

    diff = d % b
    if diff == 0:
        if a % b <= c:
            print("Yes")
            continue
        else:
            print("No")
            continue

    g = gcd(b, diff)

    init_mod = c % b

    base_mod = init_mod % g
    if b + base_mod - g > c:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
import math

T = int(input())
for i in range(T):
    a, b, c, d = list(map(int, input().split()))

    if a < b:
        print("No")
        continue

    if b > d:
        print("No")
        continue

    if c >= b: # d >= b
        print("Yes")
        continue

    diff = d % b
    if diff == 0:
        if a % b <= c:
            print("Yes")
            continue
        else:
            print("No")
            continue

    g = math.gcd(b, diff)

    init_mod = c % b

    base_mod = init_mod % g
    if b + base_mod - g > c:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
import math

T = int(input())
for i in range(T):
    a, b, c, d = map(int, input().split())

    if a < b:
        print("No")
        continue

    if b > d:
        print("No")
        continue

    if c >= b: # d >= b
        print("Yes")
        continue

    diff = d % b
    if diff == 0:
        if a % b <= c:
            print("Yes")
            continue
        else:
            print("No")
            continue

    gcd = math.gcd(b, diff)

    init_mod = c % b

    base_mod = init_mod % gcd
    if b + base_mod - gcd > c:
        print("No")
    else:
        print("Yes")

Buggy submission (verdict: Runtime Error):
import math

T = int(input())
for i in range(T):
    a, b, c, d = map(int, input().split())

    if a < b:
        print("No")
        continue

    if b > d:
        print("No")
        continue

    if c >= b: # d >= b
        print("Yes")
        continue

    diff = d % b
    if diff == 0:
        if a % b <= c:
            print("Yes")
            continue
        else:
            print("No")
            continue

    gcd = math.gcd(b, diff)

    init_mod = c % b

    base_mod = init_mod % gcd
    if b + base_mod - gcd > c:
        print("No")
    else:
        print("Yes")
Problem p03338 (python)

Fixed submission:
n = int(input())
s = input()

l_dict = {}
r_dict = {}

for c in s:
	r_dict[c] = 0
	l_dict[c] = 0

for c in s:
	r_dict[c] += 1

ans = 0
for c in s:
	l_dict[c] += 1
	r_dict[c] -= 1

	count = 0
	for k, v in l_dict.items():
		if v > 0:
			if r_dict[k] > 0:
				count += 1

	ans = max(ans, count)

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = input()

l_dict = {}
r_dict = {}

for c in s:
	r_dict[c] = 0
	l_dict[c] = 0

for c in s:
	r_dict[c] += 1

ans = 0
for c in s:
	l_dict[c] += 1
	r_dict[c] -= 1

	count = 0
	for k, v in l_dict.items():
		if v > 0:
			if r_dict[k] > 0
				count += 1

	ans = max(ans, count)

print(ans)
Problem p03370 (python)

Fixed submission:
n, x = map(int, input().split())
m = []
for i in range(n):
  m.append(int(input()))

x -= sum(m)
count = x // min(m) + n
print(count)

Buggy submission (verdict: Runtime Error):
n, x = map(int, input().split())
m = []
for i in range(n):
  m.append(int(input()))

x -= sum(m)
count = x // min(x) + n
print(count)
Problem p03377 (python)

Fixed submission:
a, b, x = map(int, input().split())

if a > x:
	print("NO")
elif x - a > b:
	print("NO")
else:
	print("YES")

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

if a > x:
	print("NO")
elif x - a > b:
	print("YES")
else:
	print("NO")
Problem p03400 (python)

Fixed submission:
n = int(input())
d, x = map(int, input().split())
ans = x
for i in range(n):
	ans += (d - 1) // int(input()) + 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
d, x = int(input())
ans = x
for i in range(n):
	ans += (d - 1) // int(input()) + 1

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
d, x = map(int(input()))
ans = x
for i in range(n):
	ans += (d - 1) // int(input()) + 1

print(ans)
Problem p03408 (python)

Fixed submission:
n = int(input())
s = [input() for _ in range(n)]
m = int(input())
t = [input() for _ in range(m)]

pointList = dict();

for temp in s:
  pointList[temp] = 0
for temp in t:
  pointList[temp] = 0
  
for temp in s:
  pointList[temp] += 1
for temp in t:
  pointList[temp] -= 1
  
ans = max(0, max(pointList.values()))

print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
s = [int(input()) for _ in range(n)]
m = int(input())
t = [int(input()) for _ in range(m)]

pointList = dict();

for temp in s:
  pointList[temp] = 0
for temp in t:
  pointList[temp] = 0
  
for temp in s:
  pointList[temp] += 1
for temp in t:
  pointList[temp] -= 1
  
ans = max(0, max(pointList.values()))

print(ans)
Problem p03415 (python)

Fixed submission:
a = input()
b = input()
c = input()
 
print(a[0]+b[1]+c[2])

Buggy submission (verdict: Runtime Error):
a=raw_input()
b=raw_input()
c=raw_input()
 
print(a[0])
print(b[1])
print(c[2])

Buggy submission (verdict: Runtime Error):
import sys

a = raw_input()
b = raw_input()
c = raw_input()
 
print(a[0])
print(b[1])
print(c[2])

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()
c = raw_input()
 
print(a[0])
print(b[1])
print(c[2])

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()
c = raw_input()
print(a[0])
print(b[1])
print(c[2])

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()
c = raw_input()
 
print(a[0])
print(b[1])
print(c[2])

Buggy submission (verdict: Runtime Error):
a = input_raw()
b = input_raw()
c = input_raw()
 
print(a[0])
print(b[1])
print(c[2])

Buggy submission (verdict: Runtime Error):
a = raw_input()
b = raw_input()
c = raw_input()

print(a[0])
print(a[1])
print(a[2])
Problem p03423 (python)

Fixed submission:
a = int(input())
b = int(a / 3)
print(b)

Buggy submission (verdict: Runtime Error):
a = input()
b = a / 3
print(b)

Buggy submission (verdict: Runtime Error):
a = input()
print(a/3)