qyliang/CodeNanoFix huggingface dataset:
Buggy code:
A, B, M = map(int, input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
value = min(a) + min(b)
for i in range(M):
    x,y,c = list(map(int, input().split()))
    if A[x-1] + B[y-1] - c < value:
        value = A[x-1] + B[y-1] - c

print(value)


Fixed code:
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

minv = min(a) + min(b)

for i in range(M):
    x, y, c = map(int, input().split())

    tmp = a[x-1] + b[y-1] - c

    if tmp < minv:
        minv = tmp

print(minv)
Buggy code:
zyouken = [int(i) for i in input().split()]
reizouko = [int(a) for a in input().split()]
densirenzi = [int(b) for b in input().split()]
minkouho = min(reizyouko) + min(densirenzi)
while zyouken[2] > 0:
    waribiki = [int(w) for w in input().split()]
    mink = reizyouko[waribiki[0]] + densirenzi[waribiki[1]] - waribiki[2]
    if mink < minkouho:
        minkouho = mink
print(minkouho)

Fixed code:
zyouken = [int(i) for i in input().split()]
reizouko = [int(a) for a in input().split()]
densirenzi = [int(b) for b in input().split()]
minkouho = min(reizouko) + min(densirenzi)
while zyouken[2] > 0:
    zyouken[2] -= 1 
    waribiki = [int(w) for w in input().split()]
    mink = reizouko[waribiki[0] - 1] + densirenzi[waribiki[1] - 1] - waribiki[2]
    if mink < minkouho:
        minkouho = mink
print(minkouho)
Buggy code:
A, B, M = map(int, input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
value = min(a) + min(b)
for i in range(M):
    x,y,c = list(map(int, input().split()))
    if A[x] + B[y] - c < value:
        value = A[x] + B[y] - c

print(value)

Fixed code:
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
value = min(a) + min(b)
for i in range(M):
    x,y,c = list(map(int, input().split()))
    if a[x-1] + b[y-1] - c < value:
        value = a[x-1] + b[y-1] - c

print(value)
Buggy code:
import cmath
import sys

INF=10**18
MOD=10**9+7
MAX=10**5+7



def main():
  A,B,M=map(int, input().split())
  a=list(map(int, input().split()))
  b=list(map(int, input().split()))
  
  ans=min(a)+min(b)
  for i in range(M):
    x,y,c=map(int, input().split())
    x-=1
    y-=1
    ans=max(ans, a[x]+b[y]-c)
  
  print(ans)
  
  
if __name__=='__main__':
    main()

Fixed code:
import cmath
import sys

INF=10**18
MOD=10**9+7
MAX=10**5+7



def main():
  A,B,M=map(int, input().split())
  a=list(map(int, input().split()))
  b=list(map(int, input().split()))
  
  ans=min(a)+min(b)
  for i in range(M):
    x,y,c=map(int, input().split())
    x-=1
    y-=1
    ans=min(ans, a[x]+b[y]-c)
  
  print(ans)
  
  
if __name__=='__main__':
    main()
Buggy code:
a, b, m = map(int, input().split())
a_price = list(map(int, input().split()))
b_price = list(map(int, input().split()))
coupon = []
for _ in range(m):
  coupon.append(list(map(int, input().split())))
  
a_copy = a_price.copy()
b_copy = b_price.copy()
a_min = a_copy.sort()[0]
b_min = b_copy.sort()[0]
min = a_min + b_min
totals = [min]
for list in coupon:
  tmp = a_list[list[0]-1] + b_list[list[1]-1] - list[2]
  totals.append(tmp)

totals.sort()
ans = totals[0]

print(ans)


Fixed code:
a, b, m = map(int, input().split())
a_price = list(map(int, input().split()))
b_price = list(map(int, input().split()))
coupon = []
for _ in range(m):
    coupon.append(list(map(int, input().split())))

a_copy = a_price.copy()
a_copy.sort()
b_copy = b_price.copy()
b_copy.sort()
a_min = a_copy[0]
b_min = b_copy[0]
min = a_min + b_min
totals = [min]
for list in coupon:
    tmp = a_price[list[0] - 1] + b_price[list[1] - 1] - list[2]
    totals.append(tmp)

totals.sort()
ans = totals[0]

print(ans)
Buggy code:
a,b,m=map(int,input().split())
ak=list(map(int,input().split()))
bk=list(map(int,input().split()))
kei=[]
for i in range(m):
    x,y,c=map(int,input().split())
    pay=[ak[x]+bk[y]-c]
    kei+=pay
print(min(kei))


Fixed code:
a,b,m=map(int,input().split())
ak=list(map(int,input().split()))
bk=list(map(int,input().split()))
kei=[]
w=min(ak)+min(bk)
kei.append(w)
for i in range(m):
    x,y,c=map(int,input().split())
    pay=ak[x-1]+bk[y-1]-c
    kei.append(pay)
print(min(kei))
Buggy code:
a, b, m = map(int, input().split())
a_s = list(map(int, input().split()))
b_s = list(map(int, input().split()))
m_s =[]

for _ in range(m):
    m_s.append(list(map(int, input().split())))

mini = min(a_s) + min(b_s)

for am, bm, sale in m_s:
    mini = min(mini, a_s[am]+b_s[bm]-sale)

print(mini)

Fixed code:
a, b, m = map(int, input().split())
a_s = list(map(int, input().split()))
b_s = list(map(int, input().split()))
m_s =[]

for _ in range(m):
    m_s.append(list(map(int, input().split())))

mini = min(a_s) + min(b_s)

for am, bm, sale in m_s:
    mini = min(mini, a_s[am-1]+b_s[bm-1]-sale)

print(mini)
Buggy code:
a, b, m = map(int, input().split())
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
k = []
for i in range(m):
    t1,t2,t3 = map(int, input().split())
    dis = As[t1-1] + Bs[t2-1] - t3
    k.append(dis)
print(min(k))



Fixed code:
a, b, m = map(int, input().split())
As = list(map(int, input().split()))
Bs = list(map(int, input().split()))
k = []
notDisc = min(As) + min(Bs)
k.append(notDisc)
for i in range(m):
    t1,t2,t3 = map(int, input().split())
    dis = As[t1-1] + Bs[t2-1] - t3
    k.append(dis)
print(min(k))
Buggy code:


a,b,m=map(int, input().split())
rei=list(map(int, input().split())) 
den=list(map(int, input().split())) 
cou = [0] * m
ans = []
for i in range(m):
	cou[i]=list(map(int, input().split()))
	ans.append(rei[cou[i][0]-1]+den[cou[i][1]-1]-cou[i][2])
print(min(ans))

Fixed code:
m=list(map(int, input().split()))
rei=list(map(int, input().split())) 
den=list(map(int, input().split())) 
cou = [0] * m[2]
ans = []
for i in range(m[2]):
	cou[i]=list(map(int, input().split()))
	ans.append(rei[cou[i][0]-1]+den[cou[i][1]-1]-cou[i][2])

ans.append(min(rei)+min(den))
print(min(ans))
Buggy code:
a, b, m = map(int, input().split())
A = [map(int, input().split())]
B = [map(int, input().split())]
C = sorted(A)
D = sorted(B)
l = C[0] + D[0]

for i in range(m):
  x, y, c = map(int, input().split())
  k = A[x-1] + B[y-1] -c
  if l > k:
    l = k
  else:
    continue
print(l)
  

Fixed code:
a, b, m = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = sorted(A)
D = sorted(B)
l = C[0] + D[0]
for i in range(m):
  x, y, c = map(int, input().split())
  k = A[x-1] + B[y-1] -c
  if l > k:
    l = k
print(l)
Buggy code:
A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
min_price = max(a)+max(b)

for i in range(M):
    x,y,c = map(int,input().split())
    min_price = min(min_price,a[x-1]+b[y-1]-c)
print(min_price)

Fixed code:
A,B,M = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
min_price = min(a)+min(b)

for i in range(M):
    x,y,c = map(int,input().split())
    min_price = min(min_price,a[x-1]+b[y-1]-c)
print(min_price)
Buggy code:
a,b,m=map(int,input().split())
a=[int(i) for i in input().split()]
b=[int(i) for i in input().split()]

ans=99999999999
for i a:
    for j in b:
        ans=min(ans,i+j)
for i in range(m):
    x,y,c=map(int,input().split())
    ans=min(ans,a[x-1]+b[y-1]-c)
print(ans)


Fixed code:
a,b,m=map(int,input().split())
A=[int(i) for i in input().split()]
B=[int(i) for i in input().split()]

ans=99999999999
ans=min(A)+min(B)
for i in range(m):
    x,y,c=map(int,input().split())
    ans=min(ans,A[x-1]+B[y-1]-c)
print(ans)
Buggy code:
import sys

def load(vtype=int):
    return vtype(input().strip())


def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]

A, B, M = tuple(load_list())

a = load_list()
b = load_list()

coupon = dict()
for _ in range(M):
    x, y, c = tuple(load_list())
    coupon[(x-1, y-1)] = c 

print(a, b, coupon)


minv = a[0] + b[0]
for i in range(0, A):
    for j in range(0, B):
        v = a[i] + b[i]
        if (i, j) in coupon:
            v -= coupon[(i,j)]
        minv = min(minv, v)
print(minv)

Fixed code:
import sys

def load(vtype=int):
    return vtype(input().strip())


def load_list(seplator=" ", vtype=int):
    return [vtype(v) for v in input().strip().split(seplator)]

A, B, M = tuple(load_list())

a = load_list()
b = load_list()

coupon = dict()
for _ in range(0, M):
    x, y, c = tuple(load_list())
    if (x-1, y-1) in coupon:
        coupon[(x-1,y-1)] = max(coupon[(x-1,y-1)], c)
    else:        
        coupon[(x-1,y-1)] = c 

minv = min(a) + min(b)

for key in coupon.keys():
    i, j = key
    minv = min(minv, a[i] + b[j] - coupon[(i, j)])

print(minv)
Buggy code:
a,b,m = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
xyc = [list(map(int,input().split())) for _ in range(m)]

price = min(A)+min(B)
for x,y,c in xyc:
    k = A[x-1] + B[y-1] - c 
    if k < price:
        price = k
        
print(k)

Fixed code:
a,b,m = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
xyc = [list(map(int,input().split())) for _ in range(m)]

price = min(A)+min(B)
for x,y,c in xyc:
    k = A[x-1] + B[y-1] - c 
    if k < price:
        price = k
        
print(price)
Buggy code:
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

min = min(a) + min(b)

for i in range(M):
  x, y, c = list(map(int, input().split()))
  tmp = a[x - 1] + b[y - 1] + c
  if min > tmp:
    min = tmp

print(min)

Fixed code:
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
min = min(a) + min(b)

for i in range(M):
  x, y, c = list(map(int, input().split()))
  tmp = a[x - 1] + b[y - 1] - c
  if min > tmp:
    min = tmp

print(min)
Buggy code:
import sys
input = sys.stdin.readline
A,B,m = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = min(a) + min(b)
for i in range(m):
	sum = 0
	x,y,c = map(int,input().split())
	sum = a[x] + b[y] - c
	ans = min(ans,sum)
print(ans)

Fixed code:
import sys
input = sys.stdin.readline
A,B,m = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
ans = min(a) + min(b)
for i in range(m):
	sum = 0
	x,y,c = map(int,input().split())
	sum = a[x-1] + b[y-1] - c
	ans = min(ans,sum)
print(ans)
Buggy code:
data = input().split(" ")
A = input().split(" ")
B = input().split(" ")
total = 0
a = 0
b = 0

for i in data:
    i = int(i)
for i in A:
    i = int(i)
for i in B:
    i = int(i)

for i in range(data[2]):
    data1 = input().split()
    for i in data1:
        i = int(i)
    data2 = A[data1[0]] + B[data[1]] - data1[2]
    if total > data2:
        total = data2

for i in A:
    if a > i:
        a = i
for i in B:
    if b > i:
        b = i

if total > a+b:
    total = a+b

print(total)

Fixed code:
data = input().split(" ")
A = input().split(" ")
B = input().split(" ")
total = 1000000
a = 1000000
b = 1000000
j = 0
for i in data:
    data[j] = int(i)
    j += 1
j = 0
for i in A:
    A[j] = int(i)
    j += 1
j = 0
for i in B:
    B[j] = int(i)
    j += 1


for i in range(data[2]):
    data1 = input().split()
    j = 0
    for i in data1:
        data1[j] = int(i)
        j += 1
    data2 = A[data1[0]-1] + B[data1[1]-1] - data1[2]
    if total > data2:
        total = data2

for i in A:
    if a > i:
        a = i
for i in B:
    if b > i:
        b = i

if total > a+b:
    total = a+b

print(total)
Buggy code:
A,B,M=map(int,input().split())
aa=list(map(int,input().split()))
bb=list(map(int,input().split()))
coupon=[list(map(int,input().split())) for i in range(M)]
min=2*(10**5)
for j in range(M):
    p_a=coupon[j][0]
    p_b=coupon[j][1]
    p_c=coupon[j][2]
    ans=aa[p_a-1]+bb[p_b-1]-p_c
    if ans<min:
            min=ans
print(min)

Fixed code:
A,B,M=map(int,input().split())
aa=list(map(int,input().split()))
bb=list(map(int,input().split()))
coupon=[list(map(int,input().split())) for i in range(M)]
mini=2*(10**5)
for j in range(M):
    p_a=coupon[j][0]
    p_b=coupon[j][1]
    p_c=coupon[j][2]
    ans=aa[p_a-1]+bb[p_b-1]-p_c
    if ans<mini:
            mini=ans
mosi=min(aa)+min(bb)
if mosi<mini:
    mini=mosi

print(mini)
Buggy code:
from sys import stdin

A, B, M = (int(x) for x in stdin.readline().rstrip().split())
ai = [int(x) for x in stdin.readline().rstrip().split()]
bj = [int(x) for x in stdin.readline().rstrip().split()]

minimum = int()
for i in range(M):
    x, y, c = (int(x) for x in stdin.readline().rstrip().split())
    price = ai[x-1] + bj[y-1] - c
    if i == 0:
        minimum = price
    if price < minimum:
        minimum = price

print(minimum)
        

Fixed code:
from sys import stdin

A, B, M = (int(x) for x in stdin.readline().rstrip().split())
ai = [int(x) for x in stdin.readline().rstrip().split()]
bj = [int(x) for x in stdin.readline().rstrip().split()]

minimum = min(ai) + min(bj)
for i in range(M):
    x, y, c = (int(x) for x in stdin.readline().rstrip().split())
    price = ai[x-1] + bj[y-1] - c
    if price < minimum:
        minimum = price

print(minimum)
Buggy code:
A, B, M = [int(i) for i in input().split(" ")]

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

for i in range(M):
  c = [int(i) for i in input().split(" ")]
  C.append(c)

print(a)

m = 1000000

for i in a:
  for j in b:
    cost = i + j
    if m >= cost:
      m = cost

for c in C:
  cost = a[c[0] - 1] + b[c[1] - 1] - c[2]
  if m >= cost:
    m = cost

print(m)

Fixed code:
A, B, M = [int(i) for i in input().split(" ")]

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

for i in range(M):
  c = [int(i) for i in input().split(" ")]
  C.append(c)

m = min(a) + min(b)

for c in C:
  cost = a[c[0] - 1] + b[c[1] - 1] - c[2]
  if m >= cost:
    m = cost

print(m)
Buggy code:
A, B, M = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]

result = min(a) + min(b)
for i in range(M):
  x, y, c = map(int, input().split())
  sum = a[x] + b[y] - c
  if sum < result:
    result = sum

print(result)

Fixed code:
A, B, M = map(int, input().split())
a = [int(x) for x in input().split()]
b = [int(x) for x in input().split()]

result = min(a) + min(b)
for i in range(M):
  x, y, c = map(int, input().split())
  sum = a[x-1] + b[y-1] - c
  if sum < result:
    result = sum

print(result)
Buggy code:
a,b,m = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = float("inf")
for i in range(m):
  x,y,c = map(int, input().split())
  ans = min(ans,a[x-1]+b[y-1]-c)
print(ans)

Fixed code:
a,b,m = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
ans = min(a)+min(b)
for i in range(m):
  x,y,c = map(int, input().split())
  ans = min(ans,a[x-1]+b[y-1]-c)
print(ans)
Buggy code:
a=input()
len=len(a)
a_cnt=0
b_cnt=0
for i in range(len):
    if a[i]='A':
        a_cnt+=1
    else :
        b_cnt+=1
if a_cnt>0 and b_cnt>0:
    print('Yes')
else :
    print('No')


Fixed code:
a=input()
len=len(a)
a_cnt=0
b_cnt=0
for i in range(len):
    if a[i]=='A':
        a_cnt+=1
    else :
        b_cnt+=1
if a_cnt>0 and b_cnt>0:
    print('Yes')
else :
    print('No')
Buggy code:
s = input()
print('Yes' if s == 'AAA' or s== 'BBB' else 'No')

Fixed code:
s = input()

if s == "AAA" or s == "BBB":
    print('No')
else:
    print('Yes')
Buggy code:
import sys
S = input()

if not ( len(S) == 3 and ( "A" in S or "B" in S)): sys.exit()

print('No') if S = 'AAA' or S = 'BBB' else print('Yes')

Fixed code:
import sys
S = input()

if not ( len(S) == 3 and ( "A" in S or "B" in S)): sys.exit()

print('No') if S == 'AAA' or S == 'BBB' else print('Yes')
Buggy code:
n=input()
a=0
for i in n:
    print(i)
    if i=="A":
        a+=1
if a%3!=0:
    print('Yes')
else:
    print('NO')


Fixed code:
n=input()
a=0
for i in n:
    if i=="A":
        a+=1
if a%3!=0:
    print('Yes')
else:
    print('No')
Buggy code:
S = input()

zikkou= [0,2]

isto = False

for n in zikkou:
    if S[n:n+1].count("A") == 1 or S[n:n+1].count("B") == 1:
       isto = True


if isto:
    print("Yes")
else:
    print("No")

Fixed code:
S = input()

zikkou= [0,2]

isto = True

for n in zikkou:
    if S.count("A") == 3 or S.count("B") == 3:
        isto = False


if isto:
    print("Yes")
else:
    print("No")
Buggy code:
s = input()

if s ='AAA' or s = 'BBB':
    print('No')
else:
    print('Yes')

Fixed code:
s=input()
if s=="AAA" or s=="BBB":
	print("No")
else:
	print("Yes")
Buggy code:
#coding utf-8

S=str(input())

if S=='AAA' or 'BBB':
  print('No')
else:
  print('Yes')
  


Fixed code:
#coding utf-8

S=str(input())

if S=='AAA':
  print('No')
else:
  if S=='BBB':
    print('No')
  else:
    print('Yes')
Buggy code:
S=input()
if S=='AAA' or 'BBB':
    print('No')
else:
    print('Yes')


Fixed code:
S=input()
if S=='AAA' or S=='BBB':
    print('No')
else:
    print('Yes')
Buggy code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

ss = nn()
a = 'No' if ss[0] == ss[1] and ss[1] == ss[2] else 'Yes'
print(a)

Fixed code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = ns()
ss = list(s)
a = 'No' if ss[0] == ss[1] and ss[1] == ss[2] else 'Yes'
print(a)
Buggy code:
S=input()
if S[0:1]==S[1:2]==S[2:3]:
  print('Yes')
else:
  print('No')

Fixed code:
S=input()
if S[0:1]==S[1:2]==S[2:3]:
    print('No')
else:
    print('Yes')
Buggy code:
s = input()
if s == 'AAA' or s == 'BBB':
  print(No)
else:
  print(Yes)

Fixed code:
#s
s= input()

if s == "AAA" or s == "BBB":
    print("No")
else:
    print("Yes")
Buggy code:
s = input()
if s == "AAA" or "BBB":
  print("No")
else:
  print("Yes")

Fixed code:
s = input()
if s == "AAA" or s== "BBB":
  print("No")
else:
  print("Yes")
Buggy code:
import sys
input = sys.stdin.readline

S = input().strip()

print('No') if S == 'AAA' or 'BBB' else print('Yes')


Fixed code:
import sys
input = sys.stdin.readline

S = input().strip()

print('No') if S == 'AAA' or S == 'BBB' else print('Yes')
Buggy code:
# coding: utf-8

s=str(input())

if s=="AAA" or s="BBB":
    print("No")
else:
    print("Yes")

Fixed code:
# coding: utf-8

s=str(input())

if s=="AAA" or s=="BBB":
    print("No")
else:
    print("Yes")
Buggy code:
s = list()

S = input()

s = S

if s[0]==s[1] or s[1]==s[2]:
    print('No')

else:
    print('Yes')

Fixed code:
s = list()

S = input()

s = S

if s[0]!=s[1] or s[1]!=s[2] or s[2]!=s[1]:
    print('Yes')

else:
    print('No')
Buggy code:
S=input()
if S=='AAA' or S=='BBB':
    print ('Yes')
else:
    print ('No')

Fixed code:
S=input()
if S=='AAA' or S=='BBB':
    print ('No')
else:
    print ('Yes')
Buggy code:
s=input()
if s[0]==s[1] and s[0]==s[1]:
    print("No")
else:
    print("Yes")

Fixed code:
s=input()
if s[0]==s[1] and s[0]==s[2]:
    print("No")
else:
    print("Yes")
Buggy code:
s = str(input())
if s is "AAA":
  print("No")
elif s is "BBB":
  print("No")
else:
  print("Yes")

Fixed code:
s = str(input())
if s == "AAA":
  print("No")
elif s == "BBB":
  print("No")
else:
  print("Yes")
Buggy code:
s=input()
if s=="AAA" or s=="BBB":
    print("Yes\n")
else:
    print("No\n")

Fixed code:
s=input()
if s=="AAA" or s=="BBB":
    print("No\n")
else:
    print("Yes\n")
Buggy code:
a = input()
c = 'No'
for i in range(2):
  if a[i] == a[i+1]:
    c = 'Yes'
    break
print(c)

Fixed code:
a = input()
c = 'No'
for i in range(2):
  if a[i] != a[i+1]:
    c = 'Yes'
    break
print(c)
Buggy code:

s =　input()
if s == 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')


Fixed code:
s = input()
print('No' if s == 'AAA' or s == 'BBB' else 'Yes')
Buggy code:
x = input()
if x in "A" and "B":
  print("No")
else:
  print("Yes")

Fixed code:
x = list(input())
if "A" in x and "B" in x:
  print("Yes")
else:
  print("No")
Buggy code:
import sys
s = sys.stdin.readline()
if s = 'AAA' or 'BBB':
  print('No')
else:
  print('Yes')

Fixed code:
import sys
s = sys.stdin.readline().rstrip()
if s == 'AAA' or s == 'BBB':
  print('No')
else:
  print('Yes')
Buggy code:
if input() == 'AAA' or input() == 'BBB':
  print ("No")
else:
  print("Yes")

Fixed code:
s = input()
if s == 'AAA' or s == 'BBB':
  print ("No")
else:
  print("Yes")
Buggy code:



m=input()
m2=[m[:1],m[1:2],m[2:]]

if 'A' and 'B' in m2:
  print('Yes')
  
else:
  print('No')


Fixed code:

m=input()
m2=[m[:1],m[1:2],m[2:]]

if 'A'in m2:
  if 'B'in m2:
    print('Yes')
  else:
    print('No')
  
else:
  print('No')
Buggy code:
# li = [[0] * 4 for i in range(3)]

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


A = input()

if A[0] == A[1] and A[1] == A[2]:
    print("Yes")
else:
    print("No")



Fixed code:
# li = [[0] * 4 for i in range(3)]

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


A = input()

if A[0] == A[1] and A[1] == A[2]:
    print("No")
else:
    print("Yes")
Buggy code:
s = input()
if len(set(s)) == 1:
  print("Yes")
else:
  print("No")


Fixed code:
s = input()

if len(list(set(s))) == 1:
    print('No')
else:
    print('Yes')
Buggy code:
S = input()

if S == "AAA" or S = "BBB":
  print(Yes)
else :
  print(No)


Fixed code:
S = input()

if S == 'AAA' or S == 'BBB':
    print('No')
else:
    print('Yes')
Buggy code:
# -*- coding: utf-8 -*-
"""
Challenge A
"""

def bus(stations):
    a = np.array(("","",""))
    for i in range(3):
        a[i] = stations[i]
    s = np.unique(a)
    if len(s)==1:
        return "No"
    elif len(s) > 1:
        return "Yes"
    else:
        return "Problem"
        
my_strings = np.array(("AAA","AAB","ABA","BAA","ABB","BBA","BBB"))
for i in my_strings:
    print(i)
    print(bus(i))


Fixed code:
# -*- coding: utf-8 -*-
"""
Challenge A
"""
import numpy as np

def bus(stations):
    a = np.array(("","",""))
    for i in range(3):
        a[i] = stations[i]
    s = np.unique(a)
    if len(s)==1:
        return "No"
    elif len(s) > 1:
        return "Yes"
    else:
        return "Problem"
        
"""
my_strings = np.array(("AAA","AAB","ABA","BAA","ABB","BBA","BBB"))
for i in my_strings:
    print(i)
    print(bus(i))
"""
    
i = input()
#print(i)
print(bus(i))
Buggy code:
S=input()
if s="AAA" or s="BBB":
  print("No")
else:print("Yes")


Fixed code:
S=input()
if S=="AAA" or S=="BBB":
  print("No")
else:print("Yes")
Buggy code:
s = list(input())
s.sort()
print(s)
if s[0] == s[2]:
    print('No')
else:
    print('Yes')

Fixed code:
s = list(input())
s.sort()
if s[0] == s[2]:
    print('No')
else:
    print('Yes')
Buggy code:
s = input()
print("Yes" if s.count("A") == 0 or s.count("B") == 0 else "No")

Fixed code:
s = input()
print("No" if s.count("A") == 0 or s.count("B") == 0 else "Yes")
Buggy code:
s = input()

if s[0]==s[1]==s[2]:
  print("Yes")
else:
  print("No")

Fixed code:
s = input()

if s[0]==s[1]==s[2]:
  print("No")
else:
  print("Yes")
Buggy code:

def main():
    s = input()
    if s[0]==s[1]==s[2]:
        print("Yes")
    else:
        print("No")

if __name__ == "__main__":
    main()

Fixed code:

def main():
    s = input()
    if s[0]==s[1]==s[2]:
        print("No")
    else:
        print("Yes")

if __name__ == "__main__":
    main()
Buggy code:
s = input()
ans = "Yes" if s in ["AAA", "BBB"] else "No"
print(ans)


Fixed code:
s = input()
ans = "No" if s in ["AAA", "BBB"] else "Yes"
print(ans)
Buggy code:
S=input()
if S!="AAA" or "BBB":
    print("Yes")
else:
    print("No")


Fixed code:
S = input()

if "AAA" == S or "BBB" == S:
    print("No")
else:
    print("Yes")
Buggy code:
S=input()
if(("AB"or"BA")in S):
  print("Yes")
else:
  print("No")


Fixed code:
S = input()
print("Yes" if "AB" in S or "BA" in S else "No")
Buggy code:
s = input()
if s == "AAA":
    yn = "Yes"
elif s == "BBB":
    yn = "Yes"
else:
    yn = "No"
print(yn)
    

Fixed code:
s = input()
if s == "AAA":
    yn = "No"
elif s == "BBB":
    yn = "No"
else:
    yn = "Yes"
print(yn)