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

Fixed submission:
# https://atcoder.jp/contests/agc034/tasks/agc034_a

import itertools
from collections import Counter
from collections import defaultdict
import bisect
import math
import heapq

def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input())

    blocks = 0
    for s in range(A - 1, C):
        if S[s] == '.':
            if blocks > 1:
                print('No')
                exit()
            blocks = 0
        else:
            blocks += 1

    blocks = 0
    for s in range(B - 1, D):
        if S[s] == '.':
            if blocks > 1:
                print('No')
                exit()
            blocks = 0
        else:
            blocks += 1

    if D < C:  # 追い越す場所が必要
        can_overtake = False
        for s in range(B - 1, D):
            if S[s-1] == '.' and S[s] == '.' and S[s+1] == '.':
                can_overtake = True
                break

        if not can_overtake:
            print('No')
            exit()

    print('Yes')


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/agc034/tasks/agc034_a

import itertools
from collections import Counter
from collections import defaultdict
import bisect
import math
import heapq

def main():
    N, A, B, C, D = map(int, input().split())
    S = input()

    ans = 'Yes'
    if '##' in S[A-1:C] or '##' in S[B-1:D]:
        ans = 'No'

    if D < C:  # 追い越す場所が必要
        if '...' not in S[B-3:D+1]:
            ans = 'No'

    print(ans)


if __name__ == '__main__':
    main()
v

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/agc034/tasks/agc034_a

import itertools
from collections import Counter
from collections import defaultdict
import bisect
import math
import heapq

def main():
    N, A, B, C, D = map(int, input().split())
    S = list(input())

    blocks = 0
    for s in range(A - 1, C):
        if S[s] == '.':
            if blocks > 1:
                print('No')
                exit()
            blocks = 0
        else:
            blocks += 1

    blocks = 0
    for s in range(B - 1, D):
        if S[s] == '.':
            if blocks > 1:
                print('No')
                exit()
            blocks = 0
        else:
            blocks += 1

    if D < C:  # 追い越す場所が必要
        can_overtake = False
        for s in range(B - 1, D + 1):
            if S[s-1] == '.' and S[s] == '.' and S[s+1] == '.':
                can_overtake = True
                break

        if not can_overtake:
            print('No')
            exit()

    print('Yes')


if __name__ == '__main__':
    main()
Problem p03053 (python)

Fixed submission:
import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect


def main():
    H, W = map(int, input().split())
    A = [list(input()) for _ in range(H)]

    checked = [[False] * W for _ in range(H)]
    ans = 0

    que = []
    for h in range(H):
        for w in range(W):
            if A[h][w] == '#' and not checked[h][w]:
                que.append((h, w))
                checked[h][w] = True
    while que:
        next_que = []
        while que:
            h, w = que.pop()
            dx4 = [0, 0, 1, -1]
            dy4 = [1, -1, 0, 0]

            for dx, dy in zip(dx4, dy4):
                next_h = h + dy
                next_w = w + dx
                if 0 <= next_h < H and 0 <= next_w < W and A[next_h][next_w] == '.' and not checked[next_h][next_w]:
                    A[next_h][next_w] = '#'
                    checked[h][w] = True
                    next_que.append((next_h, next_w))
        que = next_que
        if que:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
def main():
    H, W = map(int, input().split())
    A = [list(input()) for _ in range(H)]

    que = []
    for h in range(H):
        for w in range(W):
            if A[h][w] == '#':
                que.append((h, w))

    if len(que) == H * W:
        print(0)
        exit()

    ans = 0
    while True:
        # print(A)
        # print(len(que))
        src = que.copy()
        que = []
        for s in src:
            h = s[0]
            w = s[1]
            dx4 = [0, 0, 1, -1]
            dy4 = [1, -1, 0, 0]
            for dx, dy in zip(dx4, dy4):
                nh = h + dy
                nw = w + dx

                if 0 <= nh < H and 0 <= nw < W and A[nh][nw] == '.':
                    que.append((nh, nw))
                    A[nh][nw] = '#'

        if len(que) == 0:
            break

        ans += 1

    print(ans)

if __name__ == '__main__':
    main()

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/agc033/tasks/agc033_a

import itertools
from collections import Counter
from collections import defaultdict
import bisect

def main():
    H, W = map(int, input().split())
    A = [list(input()) for _ in range(H)]

    que = []
    for h in range(H):
        for w in range(W):
            if A[h][w] == '#':
                que.append((h, w))

    if len(que) == H * W:
        print(0)
        exit()

    ans = 0
    while True:
        # print(A)
        # print(len(que))
        src = que.copy()
        que = []
        for s in src:
            h = s[0]
            w = s[1]
            dx4 = [0, 0, 1, -1]
            dy4 = [1, -1, 0, 0]
            for dx, dy in zip(dx4, dy4):
                nh = h + dy
                nw = w + dx

                if 0 <= nh < H and 0 <= nw < W and A[nh][nw] == '.':
                    que.append((nh, nw))
                    A[nh][nw] = '#'

        if len(que) == 0:
            break

        ans += 1

    print(ans)

if __name__ == '__main__':
    main()
Problem p02753 (python)

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

Buggy submission (verdict: Runtime Error):
s = list(input())
if s == "BBB":
print("NO")

elif s == "AAA":
print("NO")

else:
print("YES")
Problem p02771 (python)

Fixed submission:
x,y,z = map(int,input().split())	
if y == x and y == z and x == z:
  print("No")
elif  x != y and y != z and x != z:
  print("No")
else:
  print("Yes")

Buggy submission (verdict: Runtime Error):
s = list(input())
if s[o]==s[1] and s[1]==s[2] and s[0]==s[2]:
  print("No")
else:
  print("Yes")
Problem p02753 (python)

Fixed submission:
if __name__== '__main__':
  s = input()
  if s[0] == 'A' and s[1] == 'A' and s[2] == 'A':
        	print('No')
  elif s[0] == 'B' and s[1] == 'B' and s[2] == 'B':
      		print('No')
  else:
        	print('Yes')

Buggy submission (verdict: Runtime Error):
if __name__== '__main__':
  s = input('>>')
  for i in range(2):
     if s[i] == 'A':
        print('Yes')
     elif s[i] == 'B':
      	print('Yes')
      else:
        print('No')
Problem p03835 (python)

Fixed submission:
K, S = map(int, input().split())
ans = 0
for o in range(0, K+1):
    for p in range(0, K+1):
            if 0 <= S-o-p <= K:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
K, S = int(input().split())
ans = 0
for o in range(2, K):
    for p in range(2, K-o):
        for q in range(2, K-o-p):
            if o + p + q == S:
                ans += 1
print(ans)

Buggy submission (verdict: Runtime Error):
K, S = int(input().split())
ans = 0
for o in range(2, K):
    for p in range(2, K):
        for q in range(2, K):
            if o + p + q == S:
                ans += 1
print(ans)
Problem p02754 (python)

Fixed submission:
N, A, B = map(int, input().split())
ans = N // (A + B) * A
rem = N % (A + B)
ans += min(rem, A)
print(ans)

Buggy submission (verdict: Runtime Error):
N, A, B = map(int, input().split())
 ans = N // (A + B) * A
 rem = N % (A + B)
 ans += min(rem, A)
 print(ans)
Problem p02757 (python)

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

counter=0
def power_func(a,b,p):
    if b==0:
        return 1
    elif b%2==0:
        d=power_func(a,b//2,p)
        return d*d %p
    elif b%2==1:
        return (a*power_func(a,b-1,p ))%p
if P==2:
    counter = 0
    for i in range(len(S)):
        if S[i] in ['2','4','6','8','0']:
            counter+=i+1
elif P==5:
    counter = 0
    for i in range(len(S)):
        if S[i] in ['5','0']:
            counter+=i+1
else:
    list_a=[0]*P
    list_a[0]+=1
    temp=0
    for i in range(N):
        M = power_func(10,N-i,P)
        temp=(int(S[i])*M+temp)%P
        counter+=list_a[temp]
        list_a[temp]+=1
print(counter)

Buggy submission (verdict: Runtime Error):
N, P = map(int, input().split())
S = input()
counter=0
def power_func(a,b,p):
	if b==0:
		return 1
    if b%2==0:
		d=power_func(a,b//2,p)
		return d*d %p
	if b%2==1:
		return (a*power_func(a,b-1,p ))%p
if P==2:
    counter = 0
    for i in range(len(S)):
        if S[i] in ['2','4','6','8','0']:
            counter+=i+1
elif P==5:
    counter = 0
    for i in range(len(S)):
        if S[i] in ['5','0']:
            counter+=i+1
else:
    list_a=[0]*P
    list_a[0]+=1
    temp=0
    for i in range(N):
      	M = power_func(10,N-i,P)
        temp=(int(S[i])*M+temp)%P
        counter+=list_a[temp]
        list_a[temp]+=1
print(counter)
Problem p02753 (python)

Fixed submission:
S = input()
a,b,c = list(S)

if a == b == c:
    print('No')
else:
    print('Yes')

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

if l[1] == 0:
    ans = 0
else:
    q, mod = divmod(l[0], (l[1]+l[2]))
    qq, modd = divmod(mod, l[1])
    if qq == 0 :
        ans = l[1] * q + modd
    else:
        ans = l[1] * (q + qq)

print(ans)
Problem p02753 (python)

Fixed submission:
strs = input()
count_A = strs.count('A')
if count_A > 0 and count_A < 3:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
def judgeServe(strs: str) -> str:
  if s.count('A') > 0 and s.count('A') < 3:
    return 'Yes'
  else:
    return 'No'

strs = input()
print(judgeServe(strs))
Problem p03137 (python)

Fixed submission:
import numpy as np

N,M = map(int,input().split())
Xs = sorted([int(i) for i in input().split()])

if N >= M:
    print(0)
elif N == 1:
    print(Xs[-1]-Xs[0])
else:
    margin = [Xs[i+1]-Xs[i] for i in range(len(Xs)-1)]
    margin = [(i,x) for i,x in enumerate(margin)]
    point = [x[0] for x in sorted(margin,key=lambda x:x[1],reverse=True)[:N-1]]
    move = 0
    move += Xs[point[0]] - Xs[0]
    for i in range(1,len(point)):
        move += Xs[point[i]] - Xs[point[i-1]+1]
    move += Xs[-1] - Xs[point[-1]+1]
    print(move)

Buggy submission (verdict: Runtime Error):
import numpy as np

N,M = map(int,input().split())
Xs = sorted([int(i) for i in input().split()])

if N >= M:
    print(0)
else:
    margin = [Xs[i+1]-Xs[i] for i in range(len(Xs)-1)]
    margin = [(i,x) for i,x in enumerate(margin)]
    point = [x[0] for x in sorted(margin,key=lambda x:x[1],reverse=True)[:N-1]]
    move = 0
    move += Xs[point[0]] - Xs[0]
    for i in range(1,len(point)):
        move += Xs[point[i]] - Xs[point[i-1]+1]
    move += Xs[-1] - Xs[point[-1]+1]
    print(move)

Buggy submission (verdict: Runtime Error):
import numpy as np

N,M = map(int,input().split())
Xs = sorted([int(i) for i in input().split()])

if N >= M:
    print(0)
else:

    margin = [Xs[i+1]-Xs[i] for i in range(len(Xs)-1)]
    point = []
    for i in range(N-1):
        p = np.argmax(margin)
        point.append(p)
        margin[p] = 0
    move = 0
    move += abs(Xs[point[0]] - Xs[0])
    for i in range(1,len(point)):
        move += abs(Xs[point[i]] - Xs[point[i-1]+1])
    move += abs(Xs[-1] - Xs[point[-1]+1])
    print(move)
Problem p02753 (python)

Fixed submission:
S = input()
 
if 'A' in S and 'B' in S:
  print('Yes')
else:
  print('No')

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

if 'A' in S && 'B' in S
  print('Yes')
else
  print('No')
Problem p02754 (python)

Fixed submission:

n, a, b = [int(i) for i in input().split()]
sy = n // (a+b)
am = n % (a+b)
print(sy*a + min(am, a))

Buggy submission (verdict: Runtime Error):
n, a, b = [int(i) for i in input().split()]
c = 0
while c <= n:
  s += [1 for _ in range(a)]
  s += [0 for _ in range(b)]
  c = len(s)
print(sum(s))
Problem p03013 (python)

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

b = [0]*(n+2)
b[0] = 1

for i in range(m):
    b[int(input())] = -1

for i in range(n):
    if b[i] != -1:
        if b[i+1] != -1:
            b[i+1] += b[i]
        if b[i+2] != -1:
            b[i+2] += b[i]
        b[i] %= 1000000007

print(b[n]%1000000007)

Buggy submission (verdict: Runtime Error):
def cul_num(key):
    if key == 0:
        return 0
    if key <= 2:
        return 1
    if key == 3:
        return 2
    return cul_num(key-1)+cul_num(key-2)+1

n, m = map(int, input().split())
a = []
res = 1

[a.append(int(input())) for _ in range(m)]
a.append(n+1)

for index,i in enumerate(a):
    if i == a[0]:
        res *= cul_num(i)
    else:
        res *= cul_num(i-a[index-1]-1)
    if res > 1000000007:
        res = res % 1000000007

print(res)
Problem p02790 (python)

Fixed submission:
a,b = [int(i) for i in input().split()]
A = max(a,b)
B = min(a,b)
a_list=[]
for _ in range(A):
	a_list.append(B)
print(''.join(map(str,a_list)))

Buggy submission (verdict: Runtime Error):
a,b = [int(i) for i in input().split()]
A = max(a,b)
B = max(a,b)
a_list=[]
for k in range(b):
	a_list.append(a)
print(''.join(map(str,a_list))
Problem p02753 (python)

Fixed submission:

a = input()

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

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

q=n//(a+b)
mod=n%(a+b)
ans=a*q
if a < mod:
    ans+=a
else:
    ans+=mod
print(ans)
Problem p03295 (python)

Fixed submission:
import bisect

N,M = [int(x) for x in input().split()]

l = [[int(x) for x in input().split()] for _ in range(M)]



def do(l):

    count = 1

    l.sort()
    right = l[0][1]


    for i in range(len(l)):
        if l[i][0] >= right:
            right = l[i][1]
            count+=1
            continue
        if l[i][1] < right:
            right = l[i][1]
    return count

testl = [[x,x+1] for x in range(1)]

result = do(l)
print(result)

Buggy submission (verdict: Runtime Error):
import bisect

N,M = [int(x) for x in input().split()]

l = [[int(x) for x in input().split()] for _ in range(M)]



def do(l):
    l1 = [v1 for (v1,_) in l]
    l2 = [v2 for (_,v2) in l]
    l1.sort()
    l2.sort()

    count = 1

    l.sort()

    h = 0
    
    for i in range(len(l)):
        nx = l2[h]
        if l[i][0] >= nx:
            count+=1
            h+=1
            while l2[h] != l2[h+1]:
                if h+1 >= len(l2):
                    break
                h+=1
    return count




result = do(l)
print(result)
Problem p02753 (python)

Fixed submission:
str = input()

ct = str.count('A')

if ct == 0 or ct == 3:
  print('No')
else:
  print('Yes')

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

ct = str.count('A')

if ct == 0 or ct == 3:
  print('No')
else :
  pritn('Yes')
Problem p02754 (python)

Fixed submission:
l=list(input().split())
N=int(l[0])
A=int(l[1])

B=int(l[2])
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*A+min(amari,A)
print(kotae)

Buggy submission (verdict: Runtime Error):
l=list(input())
N=int(l[0])
A=int(l[1])

B=int(l[2])
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*A+amari
print(kotae)

Buggy submission (verdict: Runtime Error):
l=list(input())
N=l[0]
A=l[1]
B=l[2]
syou=N//(A+B)
amari=N%(A+B)
kotae=syou*B+max(amari-A,0)
print(kotae)
Problem p02753 (python)

Fixed submission:
S=input()
cntr=0
if(S=="AAA" or S=="BBB"):
    print("No")
else:
    print("Yes")

Buggy submission (verdict: Runtime Error):
import numpy as np
S=input()
Q=int(input())
q=[[0 for i in range(3)] for j in range(Q)]
onecntr=0
for i in range(Q):
    tmp=input().split()
    if(tmp[0]=="1"):
        q[i][0]=1
    else:
        q[i][0]=2
        q[i][1]=int(tmp[1])
        q[i][2]=tmp[2]
    

for i in range(Q):
    if(q[i][0]==1):
        onecntr+=1
    else:
        
        if(onecntr%2==0):
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        else:
            if(q[i][1]==2):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
    
if(onecntr%2==1):
    S=S[::-1]

print(S)

Buggy submission (verdict: Runtime Error):
import numpy as np
S=input()
Q=int(input())
q=[[0 for i in range(3)] for j in range(Q)]
onecntr=0
for i in range(Q):
    tmp=input().split()
    if(tmp[0]=="1"):
        q[i][0]=1
    else:
        q[i][0]=2
        q[i][1]=int(tmp[1])
        q[i][2]=tmp[2]
    

for i in range(Q):
    if(q[i][0]==1):
        onecntr+=1
    else:
        
        if(onecntr%2==0):
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        else:
            if(q[i][1]==2):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        onecntr=0
    
if(onecntr%2==1):
    S=S[::-1]

print(S)

Buggy submission (verdict: Runtime Error):
import numpy as np
S=input()
Q=int(input())
q=[[0 for i in range(3)] for j in range(Q)]
onecntr=0
for i in range(Q):
    tmp=input().split()
    if(tmp[0]=="1"):
        q[i][0]=1
    else:
        q[i][0]=2
        q[i][1]=int(tmp[1])
        q[i][2]=tmp[2]
    

for i in range(Q):
    if(q[i][0]==1):
        onecntr+=1
    else:
        
        if(onecntr%2==0):
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        else:
            S=S[::-1]
            if(q[i][1]==1):
                S=q[i][2]+S
            else:
                S=S+q[i][2]
        onecntr=0
    
if(onecntr%2==1):
    S=S[::-1]

print(S)
Problem p02777 (python)

Fixed submission:
S,T=(input().split())
A,B=(input().split())
U=input()
if(U==S):
    print(int(A)-1,int(B))
if(U==T):
    print(int(A),int(B)-1)

Buggy submission (verdict: Runtime Error):
a=input().split()
N=int(a[0])
K=int(a[1])
zantei=0
P=list(map(float,input().split()))

P_ex=list(map(lambda x: (x+1)/2,P))


for i in range(0,K):
    
    zantei+=P_ex[i]
zanans=0
buffer=P_ex[0]
beforeans=zantei
for i in range(1,N-K+1):
    if(beforeans-buffer+P_ex[K+i-1]>zantei):
        zantei=beforeans+P_ex[K+i-1]-buffer
    buffer=P_ex[i]
    beforeans+=P_ex[K+i-1]-buffer

print(zantei)
Problem p02753 (python)

Fixed submission:
#! /usr/bin/env python3

s=set(input())
print("Yes") if len(s)==2 else print("No")

Buggy submission (verdict: Runtime Error):

while True:
  inp=input()
  a= set(inp)
  if(a==""):
    break
  elif(len(a)==1):
      print("No")
  else:
      print("Yes")

Buggy submission (verdict: Runtime Error):


while True:
  inp=raw_input()
  a= set(inp)
  if(a==""):
    break
  elif(len(a)==1):
      print("No")
  else:
      print("Yes")
Problem p02753 (python)

Fixed submission:
s = input()

a = False
for i in range(len(s)):
    if s[i] == "A":
        a = True
        break

b = False
for i in range(len(s)):
    if s[i] == "B":
        b = True
        break

if a and b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-

T = 0
F = 2
C = 4

s = input()
q = int(input())

cnt = 0

front = ""
back = ""

for i in range(q):
    query = input()

    if query[T] == "1":
        cnt += 1
        continue

    # モード通常
    if cnt % 2 == 0:
        if query[F] == "1":
            front =  query[C] + front
        else:
            back = query[C] + back

    # モード反転
    else:
        if query[F] == "1":
            back = query[C] + back
        else:
            front =  query[C] + front


# print(cnt)
# print(front)
# print(s)
# print(back)

moji = front+s+back

if cnt % 2 == 0:
    # print(s)
    pass
else:
    moji = moji[::-1]
    # print(s[::-1])

# front = front[::-1]

# print(front,s,back)

print(moji)

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

    a = False
    for i in range(len(s)):
        if s[i] == "A":
            a = True
            break

    b = False
    for i in range(len(s)):
        if s[i] == "B":
            b = True
            break

    print(a and b)
Problem p02753 (python)

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

Buggy submission (verdict: Runtime Error):
def q1(s):
    #reverse
    return s[::-1]
def q2(s,f,char):
    if int(f) == 1:
        s = char + s
    else:
        s= s + char
    return s


s = input()
q = int(input())
for i in range(q):
    query = input().split()
    if len(query)==1:
        s=q1(s)
    else:
        s=q2(s,query[1],query[2])
print(s)
Problem p02759 (python)

Fixed submission:
N = int(input())
if N%2 ==1:
    N += 1
print(int(N/2))

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

guess = [] #答えの候補を保管
for i in range(N):
    guess.append(-1)
exits=True #答えが存在するか
ans=-1

for i in range(M):
    s,c=input().split()
    #桁数sを直感に一致させるために-1
    s,c=int(s)-1,int(c)
    if guess[s]==-1 or guess[s]>c:
        guess[s]=c

if guess[0]==0 or guess[0]==-1 or M==0:
    exits=False 

if exits:
    ans=0
    for i in range(N):
        ans+= guess[i]*(10**(N-i-1)) if not guess[i]==-1 else 0
	#1桁の場合はcがそのまま答え
    if N==1:
        ans=c

print(ans)

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

guess = [] #答えの候補を保管
for i in range(N):
    guess.append(-1)
exits=True #答えが存在するか
ans=-1

for i in range(M):
    s,c=input().split()
    #桁数sを直感に一致させるために-1
    s,c=int(s)-1,int(c)
    if guess[s]==-1 or guess[s]==c:
        guess[s]=c
    else:
        exits=False

if guess[0]==0 or guess[0]==-1 or M==0:
    exits=False 

if exits:
    ans=0
    for i in range(N):
        ans+= guess[i]*(10**(N-i-1)) if not guess[i]==-1 else 0
	#1桁の場合はcがそのまま答え
    if N==1:
        ans=c

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
if N%2 ==1:10

    N +=1
print(int(N/2))
Problem p02753 (python)

Fixed submission:
word = input()

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

Buggy submission (verdict: Runtime Error):
word = input().split()

x = 0
i = 0

for i in range(3) :
  if word[i] != word[i+1] : x = x + 1
    
if x == 0 : print("No")

else : print("Yes")

Buggy submission (verdict: Runtime Error):
word = input().split()

x = 0

if word[1] != word[2] :
  x = x+1
  
if word[2] != word[3] :
  x = x+1
  
if word[3] != word[1] :
  x = x+1
  
if x == 0 : print("No")
  
else : print("Yes")
Problem p03072 (python)

Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[0]
for i in range(N-1):
  if H[i+1] >= max:
    ans += 1
    max = H[i+1]
print(ans+1)

Buggy submission (verdict: Runtime Error):
N = int(input())
H = list(map(int, input().split()))
ans = 0
max = H[1]
for i in range(N-1):
  if H[i+1] >= max:
    ans += 1
    max = H[i+1]
print(ans+1)
Problem p03075 (python)

Fixed submission:
a,b,c,d,e,k = list(int(input()) for _ in range(6))
if e-a <= k:
  print('Yay!')
else:
  print(':(')

Buggy submission (verdict: Runtime Error):
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
dishes = [a,b,c,d,e]
n = []
ans = 0
for i in range(5):
  if dishes[i]%10==0:
    ans += dishes[i]//10
  else:
    ans += dishes[i]//10+1
    n.append(dishes[i]%10)
if len(n)==0:
  print(ans*10)
else:
ans = ans*10-10+min(n)
print(ans)
Problem p02771 (python)

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

if a==b & b==c:
    print("No")
elif a!=b & b!=c & c!=a:
    print("No")
else:
    print("Yes")

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

if a==b & b==c:
    p5 7 5rint("No")
elif a!=b & b!=c & c!=a:
    print("No")
else:
    print("Yes")

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

if a==b & b==c:
    p5 7 5rint("No")
elif a!=b & b!=c & c!=a:
    print("No")
else:
    print("Yes")
Problem p02829 (python)

Fixed submission:
A = int(input())
B = int(input())

print(6-A-B)

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

print(6-A-B)