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

Fixed submission:
#modの掛け算

def modmal(a,b,mod): #a*bをmodを法にして求める

    return a * b % mod


#modの割り算

def moddiv(a,b,mod): #a/bをmodを法にして求める

    return (a * pow(b,mod-2,mod)) % mod


#逆元

def inverse(a,mod): #aのmodを法にした逆元を返す
    return pow(a,mod-2,mod)



#modのn!と、n!の逆元を格納したリストを返す(拾いもの)
#factorialsには[1, 1!%mod , 2!%mod , 6!%mod… , n!%mod] が入っている
#invsには↑の逆元が入っている

def modfac(n, MOD):
 
    f = 1
    factorials = [1]
    for m in range(1, n + 1):
        f *= m
        f %= MOD
        factorials.append(f)
    inv = pow(f, MOD - 2, MOD)
    invs = [1] * (n + 1)
    invs[n] = inv
    for m in range(n, 1, -1):
        inv *= m
        inv %= MOD
        invs[m - 1] = inv
    return factorials, invs


def modnCr(n,r,mod,fac,inv): #上で求めたfacとinvsを引数に入れるべし(上の関数で与えたnが計算できる最大のnになる)

    return fac[n] * inv[n-r] * inv[r] % mod


n = int(input())

dic = {}

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

for i in range(n+1):

    if a[i] not in dic:
        dic[a[i]] = [i]
    else:
        dic[a[i]].append(i)
        twonum = a[i]

mod = 10**9+7
fac,inv = modfac(n+10,mod)

for k in range(n+1):
    
    k += 1
    
    ans = modnCr(n+1,k,mod,fac,inv)

    l = dic[twonum][0]
    r = (n+1) - dic[twonum][1] - 1

    if l+r >= k-1:
        ans -= modnCr(l+r,k-1,mod,fac,inv)

    print (ans % mod)

Buggy submission (verdict: Runtime Error):

n = int(input())

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

indlis = [-1] * (n+1)


for i in range(n):

    if indlis[a[i]] == -1:
        indlis[a[i]] = i

    else:
        L = indlis[a[i]]
        R = i
        break

#print (L,R)
nall = n+1
nsub = 1

for i in range(n+1):

    print ((nall - nsub) % (10 ** 9 + 7))

    nall *= n - i
    nall //= 2+i

    nsub *= n-R+L-i
    nsub //= 1+i
Problem p03677 (python)

Fixed submission:

"""
Writer: SPD_9X2
https://atcoder.jp/contests/arc077/tasks/arc077_c

お気に入りを決めてる時、その数字を超えるような移動が発生した場合だけ、ボタン2が有効になる。
ALLボタン１に比べて、何回節約できるかをimos法で計算する

"""

n,m = map(int,input().split())

lis = [0] * m

state = [0] * n

a = list(map(int,input().split()))
for i in range(n):
    a[i] -= 1

start = [ [] for i in range(m) ]
end = [ [] for i in range(m)]

allsum = 0
for i in range(n-1):

    allsum += (a[i+1]-a[i]) % m
    if a[i+1] == (a[i]+1)%m:
        continue

    start[(a[i]+1) % m].append(i)
    end[a[i+1] % m].append(i)

    


imosnum = 0
plus = 0

#print (start,end)

for i in range(2*m):

    plus += imosnum

    lis[i%m] += plus

    for j in end[i%m]:
        if state[j] == 1:
            plus -= ((a[j+1]-(a[j]+1))%m)
            state[j] = 2
            imosnum -= 1

    for j in start[i%m]:
        if state[j] == 0:
            imosnum += 1
            state[j] = 1

    #print (i+1,imosnum,plus)

if (allsum - max(lis) < 0):
    print (asxacscd)
#print (lis)
print (allsum - max(lis))

Buggy submission (verdict: Runtime Error):

"""
Writer: SPD_9X2
https://atcoder.jp/contests/arc077/tasks/arc077_c

お気に入りを決めてる時、その数字を超えるような移動が発生した場合だけ、ボタン2が有効になる。
ALLボタン１に比べて、何回節約できるかをimos法で計算する

"""

n,m = map(int,input().split())

lis = [0] * m

state = [0] * n

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

start = [ [] for i in range(m) ]
end = [ [] for i in range(m)]

allsum = 0
for i in range(n-1):

    if a[i+1] == (a[i]+1)%m:
        continue

    start[a[i] % m].append(i)
    end[(a[i+1]-1) % m].append(i)

    allsum += (a[i+1]-a[i]) % m


imosnum = 0
plus = 0

#print (start,end)

for i in range(2*m):

    plus += imosnum

    lis[i%m] += plus

    for j in end[i%m]:
        if state[j] == 1:
            plus -= ((a[j+1]-(a[j]+1))%m)
            state[j] = 2
            imosnum -= 1

    for j in start[i%m]:
        if state[j] == 0:
            imosnum += 1
            state[j] = 1

    #print (i+1,imosnum,plus)

if (allsum - max(lis) < 0):
    print (asxacscd)
print (allsum - max(lis))
Problem p03703 (python)

Fixed submission:

def bitadd(a,w,bit): #aにwを加える(1-origin)

    x = a
    while x <= (len(bit)-1):
        bit[x] += w
        x += x & (-1 * x)

def bitsum(a,bit): #ind 0～aまでの和を求める

    ret = 0
    x = a
    while x > 0:
        ret += bit[x]
        x -= x & (-1 * x)
    return ret


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

a = []

for i in range(N):

    A = int(input())
    a.append(A-K)


B = [0]

for i in range(N):

    B.append(B[-1] + a[i])

#print (B)
C = B.copy()
C.sort()

dic = {}

num = 1
for i in range(N+1):

    if i == 0:
        dic[C[i]] = num
        num += 1
    elif C[i] != C[i-1]:
        dic[C[i]] = num
        num += 1

for i in range(N+1):
    B[i] = dic[B[i]]

BIT = [0] * (len(B) + 1)

ans = 0

for i in range(N+1):

    ans += bitsum(B[i],BIT)
    bitadd(B[i],1,BIT)

print (ans)

Buggy submission (verdict: Runtime Error):

def bitadd(a,w,bit): #aにwを加える(1-origin)

    x = a
    while x <= (len(bit)-1):
        bit[x] += w
        x += x & (-1 * x)

def bitsum(a,bit): #ind 0～aまでの和を求める

    ret = 0
    x = a
    while x > 0:
        ret += bit[x]
        x -= x & (-1 * x)
    return ret


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

a = []

for i in range(N):

    A = int(input())
    a.append(A-K)


B = [0]

for i in range(N):

    B.append(B[-1] + a[i])

#print (B)
C = B.copy()
C.sort()

dic = {}

num = 1
for i in range(N+1):

    if i == 0:
        dic[C[i]] = num
        num += 1
    elif C[i] != C[i-1]:
        dic[C[i]] = num
        num += 1

for i in range(N+1):
    B[i] = dic[B[i]]

BIT = [0] * (len(B) + 1)

ans = 0

for i in range(N+1):

    ans += bitsum(B[i],BIT)
    bitadd(B[i],1,BIT)

print (ans)
Problem p03808 (python)

Fixed submission:
"""
基本の差はable

 1  2 3  4 5
 4  5 1  2 3
+2  3 4  5 1

 7 10 8 11 9
sa3 -2 3 -2 -2

一度も選ばれてない=3
選ばれてる = -2
一回で -5・・・？
一回選ばれると本来あった +1が消えて -4される →よって-5
"""

import sys

N = int(input())

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

M = N*(N+1)//2

if sum(A) % M != 0:
    print ("NO")
    sys.exit()

able = sum(A) // M

#print (M,able)

A.append(A[0])
now = 0

for i in range(N):

    #print ((A[i+1]-A[i]-able)//N)

    if A[i+1] - A[i] == able:
        continue

    else:
        
        if ((A[i+1]-A[i])-able) % N != 0 or ((A[i+1]-A[i])-able) // N > 0:
            print ("NO")
            sys.exit()

        else:
            now += ((A[i+1]-A[i])-able) // (0-N)


if now == able:
    print ("YES")
else:
    print ("NO")

Buggy submission (verdict: Runtime Error):
import sys

N = int(input())

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

M = N*(N+1)//2

if sum(A) % M != 0:
    print ("NO")
    sys.exit()

able = sum(A) // M

print (M,able)

A.append(A[0])
now = 0

for i in range(N):

    if A[i+1] - A[i] == able:
        continue

    else:
        #print (A[i+1],A[i],able,1-N)
        if ((A[i+1]-A[i])-able) % (1-N) != 0:
            print ("NO")
            sys.exit()

        else:
            now += ((A[i+1]-A[i])-able) // (1-N)


if now <= able:
    print ("YES")
else:
    print ("NO")
Problem p03841 (python)

Fixed submission:
from collections import deque
import sys

N = int(input())

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

mustuse = deque([])
ableuse = deque([])

xlis = []
ans = [None] * (N ** 2)

for i in range(N):
    ans[x[i]-1] = i+1
    xlis.append([x[i],i+1])

xlis.sort()

for i in range(N):

    for j in range(xlis[i][1]-1):
        mustuse.append(xlis[i][1])

#print (ans)
#print (mustuse)

for i in range(N**2):

    if ans[i] != None:

        if len(mustuse) > 0 and mustuse[0] == ans[i]:
            print ("No")
            sys.exit()
        for j in range(N-ans[i]):
            ableuse.append(ans[i])

    else:

        if len(mustuse) > 0:
            ans[i] = mustuse.popleft()

        elif len(ableuse) > 0:
            ans[i] = ableuse.popleft()

        else:
            print ("No")
            sys.exit()

print ("Yes")
print (" ".join(map(str,ans)))

Buggy submission (verdict: Runtime Error):
from collections import deque
import sys

N = int(input())

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

mustuse = deque([])
ableuse = deque([])

xlis = []
ans = [None] * (N ** 2)

for i in range(N):
    ans[x[i]-1] = i+1
    xlis.append([x[i],i+1])

xlis.sort()

for i in range(N):

    for j in range(xlis[i][1]-1):
        mustuse.append(xlis[i][1])

#print (ans)
#print (mustuse)

for i in range(N**2):

    if ans[i] != None:

        if mustuse[0] == ans[i]:
            print ("No")
            sys.exit()
        for j in range(N-ans[i]):
            ableuse.append(ans[i])

    else:

        if len(mustuse) > 0:
            ans[i] = mustuse.popleft()

        elif len(ableuse) > 0:
            ans[i] = ableuse.popleft()

        else:
            print ("No")
            sys.exit()

print ("Yes")
print (" ".join(map(str,ans)))
Problem p03946 (python)

Fixed submission:

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

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

nmin = float("inf")
nsub = 0
ans = 0

Acopy = A.copy()
Acopy.sort()

for i in Acopy:

    if A[-1] == i:
        del A[-1]
    else:
        break


for i in range(len(A)):

    nmin = min(nmin , A[i])

    if nsub < A[i] - nmin:
        nsub = A[i] - nmin
        ans = 1

    elif nsub == A[i] - nmin:
        ans += 1

print (ans)

Buggy submission (verdict: Runtime Error):

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

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

nmin = float("inf")
nsub = 0
ans = 0

Acopy = A.copy()
Acopy.sort()

for i in Acopy:

    if A[-1] == i:
        del A[-1]
    else:
        break


for i in range(len(A)):

    nmin = min(nmin , A[i])

    if nsub < A[i] - nmin:
        nsub = A[i] - nmin
        ans = 1

    elif nsub == A[i] - nmin:
        ans += 1

print (ans)
Problem p03952 (python)

Fixed submission:

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

if x <= 2 or 2*N-x <= 2:

    if N == 2 and x == 2:
        print ("Yes")
        print ("1")
        print ("2")
        print ("3")

    elif N >= 3 and (x == 2):

        print ("Yes")
        notend = [True] * (2*N-1)
        lis = [0] * (2*N-1)

        lis[N-1] = x
        notend[x-1] = False
    
        lis[N] = x-1
        notend[x-1-1] = False

        ind = 0

        for i in range(2*N-1):

            if lis[i] == 0:
            
                while not notend[ind]:
                    ind += 1
    
                lis[i] = ind + 1
                notend[ind] = False
            

        for i in lis:
            print (i)

    elif N >= 3 and (x == 2*N-2):

        print ("Yes")
        notend = [True] * (2*N-1)
        lis = [0] * (2*N-1)

        lis[N-1] = x
        notend[x-1] = False
    
        lis[N] = x+1
        notend[x+1-1] = False

        ind = 0

        for i in range(2*N-1):

            if lis[i] == 0:
            
                while not notend[ind]:
                    ind += 1
    
                lis[i] = ind + 1
                notend[ind] = False
            

        for i in lis:
            print (i)  
        

    else:
        print ("No")
    
else:
    print ("Yes")
    notend = [True] * (2*N-1)
    lis = [0] * (2*N-1)

    lis[N-1] = x
    notend[x-1] = False

    lis[N] = x+1
    notend[x+1-1] = False

    lis[N-2] = x-2
    notend[x-2-1] = False

    lis[N+1] = x-1
    notend[x-1-1] = False

    lis[N-3] = x+2
    notend[x+2-1] = False

    ind = 0

    for i in range(2*N-1):

        if lis[i] == 0:
            
            while not notend[ind]:
                ind += 1

            lis[i] = ind + 1
            notend[ind] = False
            

    for i in lis:
        print (i)

Buggy submission (verdict: Runtime Error):

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

if x <= 2 or 2*N-x <= 2:
    print ("No")
else:
    print ("Yes")
    notend = [True] * (2*N-1)
    lis = [0] * (2*N-1)

    lis[N-1] = x
    notend[x] = False

    lis[N] = x+1
    notend[x+1] = False

    lis[N-2] = x-2
    notend[x-2] = False

    lis[N+1] = x-1
    notend[x-1] = False

    lis[N-3] = x+2
    notend[x+2] = False

    ind = 0

    for i in range(2*N-1):

        if lis[i] == 0:
            
            while not notend[ind]:
                ind += 1

            lis[i] = ind + 1
            ind += 1

    print (" ".join(map(str,lis)))
Problem p03957 (python)

Fixed submission:
S = input()

a = 0

for i in S:
  if a == 0 and i == "C":
    a += 1
  if a == 1 and i == "F":
    a += 1
    
if a == 2:
  print ("Yes")
else:
  print ("No")

Buggy submission (verdict: Runtime Error):

S = int(input())

a = 0

for i in S:
  if a == 0 and i == "C":
    a += 1
  if a == 1 and i == "F":
    a += 1
    
if a == 2:
  print ("Yes")
else:
  print ("No")
Problem p04017 (python)

Fixed submission:
import bisect

def wantp(p,day):

    for i in range(len(db)):
        i = len(db)-1-i

        if day & (2 ** i) > 0:
            p = db[i][p]

        #print (day,i)

    return p


N = int(input())
x = list(map(int,input().split()))
L = int(input())

able = []

for i in range(N):

    able.append(bisect.bisect_right(x,x[i] + L) - 1)


db = [able]

while min(db[-1]) != N-1:

    new = []

    for i in range(N):

        new.append(db[-1][db[-1][i]])

    db.append(new)


Q = int(input())

for loop in range(Q):

    a,b = map(int,input().split())
    if a > b:
        t = a
        a = b
        b = t
    a -= 1
    b -= 1

    l = 0
    r = 2 ** len(db)

    while r-l != 1:

        m = (l+r) // 2

        np = wantp(a,m)
        #print (a,m,np)

        if np < b:
            l = m
        else:
            r = m

    print (r)

Buggy submission (verdict: Runtime Error):
import bisect

def wantp(p,day,db):

    for i in range(len(db)):
        i = len(db)-1-i

        if day & (2 ** i) > 0:
            p = db[i][p]

    return p

N = int(input())

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

L = int(input())

able = []

for i in range(N):

    able.append(bisect.bisect_right(x,x[i] + L) - 1)

#print (able)

db = [able]

while min(db[-1]) != N-1:

    new = []

    for i in range(N):

        new.append(db[-1][db[-1][i]])

    db.append(new)

db1 = db.copy()

for i in range(N):
    x[i] = x[-1] - x[i]
x.reverse()
#print (x)

able = []
for i in range(N):
    able.append(bisect.bisect_right(x,x[i] + L) - 1)
db = [able]
while min(db[-1]) != N-1:
    new = []
    for i in range(N):
        new.append(db[-1][db[-1][i]])
    db.append(new)
db2 = db
#print (db2)


Q = int(input())

for loop in range(Q):

    a,b = map(int,input().split())
    a -= 1
    b -= 1

    if a < b:

        l = 0
        r = N+1

        while r-l != 1:

            m = (l+r) // 2

            np = wantp(a,m,db1)
            #print (a,m,np)

            if np < b:
                l = m
            else:
                r = m

        print (r)

    else:
        a = N-1-a
        b = N-1-b

        l = 0
        r = N+1

        while r-l != 1:

            m = (l+r) // 2

            np = wantp(a,m,db2)
            #print (a,m,np)

            if np < b:
                l = m
            else:
                r = m

        print (r)
Problem p02663 (python)

Fixed submission:
a,b,c,d,e = map(int,input().split())
print((c*60+d)-(a*60+b)-e)

Buggy submission (verdict: Runtime Error):
a,b,c,d,e = map(int,input.split())
print((c*60+d)-(a*60+b)-e)

Buggy submission (verdict: Runtime Error):
a,b = map(int,input.split())
c,d = map(int,input.split())
e = int(input())
print((c*60+d)-(a*60+b)-e)
Problem p02664 (python)

Fixed submission:
a = input()
print(a.replace("?","D"))

Buggy submission (verdict: Runtime Error):
a = input()
print(a.replace("?","D")
Problem p02675 (python)

Fixed submission:
a = int(input())
b = a%10
print("hon" if b in [2,4,5,7,9] else "pon" if b in [0,1,6,8] else "bon")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = a%10
print("hon" if b == 2,4,5,7,9 else "pon" if b == 0,1,6,8 else "bon")

Buggy submission (verdict: Runtime Error):
a = int(input())
b = a%10
print("hon" if b = 2,4,5,7,9 else "pon" if b = 0,1,6,8 else "bon")
Problem p02677 (python)

Fixed submission:
a,b,c,d = map(int,input().split())
import math
rad = math.fabs((c/12 - d/60 + d/720)*360)
rad = min(rad,360-rad)/180
cosine = math.cos(rad*math.pi)
print((a**2+b**2 - 2*a*b*cosine)**0.5)

Buggy submission (verdict: Runtime Error):
a,b,c,d = map(int,input().split())
import math
rad = math.fabs((c/12 - d/60)*360)
rad = min(rad,360-rad)
cosine = (math.cos(math.radians(rad))
print((a**2+b**2 - 2*a*b*cosine)**0.5)
Problem p02861 (python)

Fixed submission:
N = int(input())

P = []

S = 0

for i in range(N):
   P.append(list(map(int,input().split())))


for i in range(N-1):
   for j in range(N-1-i):
       
       S += (((P[i][0] - P[i+j+1][0])**2 + (P[i][1] - P[i+j+1][1])**2)**0.5)*2
       
print(S/N)

Buggy submission (verdict: Runtime Error):
a = int(input())
b = [list(map(int, input().split())) for i in range(a)]
import math
c = math.factorial(a)//(a-1)
count = 0
for i in range(a-1):
  for j in range(i+1:a):
    count += ((b[i][0]-b[j][0])*2+(b[i][1]-b[j][1])*2)*0.5
print(count*c)
Problem p02946 (python)

Fixed submission:
a,b = map(int,input().split())
for i in range(b-a+1,b+a):
  print(i)

Buggy submission (verdict: Runtime Error):
a,b = map(int.input().split())
for i in range(b-a+1,b+a):
  print(i,end=' ')

Buggy submission (verdict: Runtime Error):
a,b = map(int.input().split())
for i in range(b-a+1,b+a):
  print(i)

Buggy submission (verdict: Runtime Error):
a,b = map(int.input().split())
for i in range(b-a+1,b+a):
  print(i)
Problem p03543 (python)

Fixed submission:
a = input()
print("Yes" if a[0]==a[1]==a[2] or a[1]==a[2]==a[3] else "No")

Buggy submission (verdict: Runtime Error):
a = input()
print("Yes" if a[0]=a[1]=a[2] or a[1]=a[2]=a[3] else "No")
Problem p03605 (python)

Fixed submission:
a = input()
print("Yes" if "9" in a else "No")

Buggy submission (verdict: Runtime Error):
a = int(input())
print("Yes" if 9 in a else "No")
Problem p03636 (python)

Fixed submission:
s = input()
print(s[0]+str(len(s)-2)+s[-1])

Buggy submission (verdict: Runtime Error):
s = input()
print(s[0]+str(len(s)-2)+s[len(s)])
Problem p02548 (python)

Fixed submission:
import math
n = int(input())
m = int(math.sqrt(n))
if n == m ** 2:
    m -= 1

ans = 0
for i in range(1, m + 1):
    t = int((n - 1) / i)
    ans += (t- i + 1) * 2
    if n != i ** 2:
        ans -= 1 
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
k = int(math.sqrt(n)) if n != k ** 2 else int(math.sqrt(n)) - 1
ans = 0
for i in range(1, k + 1):
    t = int((n - 1) / i)
    ans += (t- i + 1) * 2
    if n != i ** 2:
        ans -= 1 
print(ans)

Buggy submission (verdict: Runtime Error):
import math
n = int(input())
k = int(math.sqrt(n)) if n != k ** 2 else int(math.sqrt(n)) - 1
ans = 0
for i in range(1, k + 1):
    t = int((n - 1) / i)
    ans += (t- i + 1) * 2
    if n != i ** 2:
        ans -= 1 
print(ans)
Problem p02612 (python)

Fixed submission:
N = int(input())
if 1 <= N <= 999:
  print(1000-N)
elif int(str(N)[1:]) ==0:
  print(0)
else:
    print(1000-int(str(N)[1:]))

Buggy submission (verdict: Runtime Error):
N = int(input())
if int(str(N)[1:]) ==0:
  print(0)
else:
    print(1000-int(str(N)[1:]))
Problem p02658 (python)

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

limit = 10 ** 18
A.sort()
result = A[0]
for a in A[1:]:
  result *= a
  if result > limit:
    print(-1)
    exit()
print(result)

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

ans =1

for i in A:
  ans = i *ans
  if ans > 10**18:
    break
    print(-1)

print(ans)
Problem p02694 (python)

Fixed submission:
X = int(input())
count = 0
money =100

while True:
  money = int(money*1.01)
  count +=1
  if money >= X:
    break
print(count)

Buggy submission (verdict: Runtime Error):
import math
X = int(input())

def f(x):
  return math.log(x)/100.01

print(math.ceil(f(x)))
Problem p02760 (python)

Fixed submission:
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
B =  [int(input()) for _ in range(N)]

for b in B:
  for i in range(3):
    for j in range(3):
      if A[i][j] == b:
        A[i][j] = 0

for i in range(3):
  if A[i][0] == A[i][1] == A[i][2] == 0:
    print('Yes')
    exit()

  if A[0][i] == A[1][i] == A[2][i] == 0:
    print('Yes')
    exit()
    
if A[0][0] == A[1][1] == A[2][2] == 0:
    print('Yes')
    exit()
 

if A[0][2] == A[1][1] == A[2][0] == 0:
    print('Yes')
    exit()
    
  
print('No')

Buggy submission (verdict: Runtime Error):
A = [list(map(int, input().split())) for _ in range(3)]
N = int(input())
B =  [int(input()) for _ in range(N)]

for b in B:
  if i in range(3):
    for j in range(3):
      if A[i][j] == b:
        A[i][j] = 0

for i in range(3):
  if A[i][0] == A[i][1] == A[i][2] == 0:
    print('Yes')
    exit()

  if A[0][i] == A[1][i] == A[2][i] == 0:
    print('Yes')
    exit()
    
if A[0][0] == A[1][1] == A[2][2] == 0:
    print('Yes')
    exit()
 

if A[0][2] == A[1][1] == A[2][0] == 0:
    print('Yes')
    exit()
    
  
print('No')

Buggy submission (verdict: Runtime Error):
a1,a2,a3 = map(int,input().split())
b1,b2,b3 = map(int,input().split())
c1,c2,c3 = map(int,input().split())
N = int(input())
b =  [int(input()) for _ in range(N)]

if a1 and a2 and a3 in b or
    b1 and b2 and b3 in b or
    c1 and c2 and c3 in b or
    a1 and b1 and c1 in b or
    a2 and b2 and c2 in b or
    a3 and b3 and c3 in b or
    a1 and b2 and c3 in b or
    a3 and b2 and c1 in b:
    print('Yes')
else:
    print('No')
Problem p02765 (python)

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

print( R if N >= 10 else R + 100*(10-N))

Buggy submission (verdict: Runtime Error):
N,R = map(int,input())

print( R if N >10 else R - 100*(10-N))

Buggy submission (verdict: Runtime Error):
N,K = map(int,input())

print(100*(10-K) if N <=10 else K)
Problem p02767 (python)

Fixed submission:
import math
N = int(input())
X = list(map(int,input().split()))
P = math.ceil(sum(X)/N)
P1 = P - 1
hp = 0
hp2 = 0

for x in X:
  hp_x = (P-x)**2
  hp2_x = (P1 - x)**2
  hp = hp + hp_x
  hp2 = hp2 + hp2_x
print(min(hp,hp2))

Buggy submission (verdict: Runtime Error):
import math
N = int(input())
X = list(map(int,input().split()))
P = math.ceil(sum(X)/N)
P1 = P - 1
hp = 0

for x in X:
  hp_x = (P-x)**2
  hp2_x = (P1 - x)**2
  hp = hp + hp_x
  hp2 = hp2 + hp2_x
print(min(hp,hp2))

Buggy submission (verdict: Runtime Error):
N = int(input())
X = list(map(input().split()))
P = ceil(sum(X)/2)

hp = 0

for x in X:
  hp_x = (P-X)**2
  hp = hp + hp_x
print(hp)
Problem p02801 (python)

Fixed submission:
C = input()

abc ='abcdefghijklmnopqrstuvwxyz'

print(abc[abc.index(C) +1])

Buggy submission (verdict: Runtime Error):
C = input()

abc ='abcdefghijklmnopqrstuvwxyz'

print(abc[abc.index(C+1))]
Problem p02817 (python)

Fixed submission:
S,T = input().split()

print(T+S)

Buggy submission (verdict: Runtime Error):
S,T = map(input().split())

print(T,S)
Problem p02899 (python)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
lists = [0] * n

for i in range(n):
    lists[a[i] - 1] = i + 1
    
for i in lists:
  print(i , end =' ')

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

lists = [0]*N

for i in range(N):
  lists[i] = A.index(i+1)+1
  
for i in lists:
  print(i, end=' ')
Problem p02921 (python)

Fixed submission:
S = input()
T = input()

count = 0

if S[0] == T[0]:
  count += 1
if S[1] == T[1]:
  count +=1
if S[2] == T[2]:
  count +=1
print(count)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

count = 0

for i,j in S,T:
  if S[i] == T[j]:
    count +=1
print(count)

Buggy submission (verdict: Runtime Error):
S = input()
T = input()

count = 0

for i in S,T:
  if S[i] == T[i]:
    count +=1
print(count)
Problem p02922 (python)

Fixed submission:
import math
A, B = map(int,input().split())

x = math.ceil(1+(B-A)/(A-1))

print(x)

Buggy submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
print(math.cail((B-A)/(A-1))+1)

Buggy submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
print(math.cail((B-A)/(A-1))+1))

Buggy submission (verdict: Runtime Error):
import math
A, B = map(int, input().split())
print(math.cail((B-A)/(A-1))+1)

Buggy submission (verdict: Runtime Error):
import math
A,B = map(int, input().split())

print(math.ceil(B/(A-1))

Buggy submission (verdict: Runtime Error):
A,B = map(int,input())

print(B//A +1)