Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys,math,collections,itertools
input = sys.stdin.readline

N,K,S=list(map(int,input().split()))
ans = [0]*N
if S !=10**9-1:
    ans[K]=10**9-1
else:
    ans[K]=10**9-2
ans[0]=S

print(*ans)


Fixed submission:
import sys,math,collections,itertools
input = sys.stdin.readline

N,K,S=list(map(int,input().split()))
if S == 10**9:
    ans = [10**9-1]*N
else:
    ans = [10**9]*N
for i in range(K):
    ans[i]=S
print(*ans)

Buggy python submission (verdict: Runtime Error):
import sys,math,collections,itertools
input = sys.stdin.readline

N,K,S=list(map(int,input().split()))
ans = [0]*N
ans[K]=10**9+1
ans[0]=S

print(*ans)

Fixed submission:
import sys,math,collections,itertools
input = sys.stdin.readline

N,K,S=list(map(int,input().split()))
if S == 10**9:
    ans = [10**9-1]*N
else:
    ans = [10**9]*N
for i in range(K):
    ans[i]=S
print(*ans)
Buggy python submission (verdict: Time Limit Exceeded):
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

N = int(input())
S = input()
q = collections.deque()
pm = itertools.combinations(range(N),3)

for i in pm:
    s = S[i[0]]+S[i[1]]+S[i[2]]
    q.append(s)
print(len(set(q)))


Fixed submission:
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

N = int(input())
S = input()
sl = list(S)
setS = set(S)
ans = 0
for i in range(10):
    if str(i) not in setS:
        continue
    else:
        i100_ind = sl.index(str(i))
        S10 =sl[i100_ind+1:-1]
        S10set = set(S10)
        for j in range(10):
            if str(j) not in S10set:
                continue
            else:
                i10_ind = S10.index(str(j))
                S1 = S10[i10_ind+1:]
                S1.append(sl[-1])
                ans += len(set(S1))
print(ans)
Buggy python submission (verdict: Runtime Error):
import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
A=list(map(int,input().split()))
X = [0,0,0]

m = 10**9+7
patern = 1

for a in A:
    patern *= X.count(a)
    patern %= m
    X[X.index(a)]+=1
    

print(patern % m)
    


Fixed submission:
import sys,math,collections,itertools
input = sys.stdin.readline
 
N=int(input())
A=list(map(int,input().split()))
color1 = -1
color2 = -1
color3 = -1
 
m = 10**9+7
patern = 1
 
for a in A:
    if color1 == a-1 and color2 == a-1 and color3 == a-1:
        patern = (patern * 3)%m
        color1 = a
 
    elif (color1 != a-1 and color2 == a-1 and color3 == a-1):
        patern = (patern * 2)%m
        color2 = a
 
    elif (color1 == a-1 and color2 == a-1 and color3 != a-1):
        patern = (patern * 2)%m
        color1 = a
    elif (color1 == a-1 and color2 != a-1 and color3 != a-1):
        color1 = a
 
    elif (color1 != a-1 and color2 == a-1 and color3 != a-1):
        color2 = a
 
    elif (color1 != a-1 and color2 != a-1 and color3 == a-1):
        color3 = a
 
    elif (color1 != a-1 and color2 != a-1 and color3 != a-1):
        patern = 0
        break
print(patern)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline
H,W,K =list(map(int,input().split()))
s = [input().rstrip() for _ in range(H)]
cut = []
cnt = 0
tmp_num=0
for ih in range(H):
    if s[ih].count('#')==0 and cut==[]:
        tmp_num +=1
        continue
    elif s[ih].count('#')==0 and cut!=[] and tmp_num == 0:
        cut.append(tmp)
        continue
    elif cut!=[] and tmp_num != 0:
        while tmp_num:
            cut.append(tmp)
            tmp_num -= 1
    tmp = []
    cnt +=1
    s[ih] = s[ih].replace('#','.',1)
    for iw in range(W):
        if s[ih][iw] == '#':
            cnt +=1
        tmp.append(cnt)
    cut.append(tmp)
for i in range(H):
    print(*cut[i])


Fixed submission:
import sys
input = sys.stdin.readline
H,W,K =list(map(int,input().split()))
s = [input().rstrip() for _ in range(H)]
cut = [[0]*W for _ in range(H)]
cnt =0
for ih in range(H):
    if s[ih].count('#')==0:
        continue
    else:
        for iw in range(W):
            if s[ih][iw] == '#':
                cnt +=1
                cut[ih][iw]= cnt

for ih in range(H):
    for iw in range(W-1):
        if cut[ih][iw+1] ==0:
            cut[ih][iw+1]= cut[ih][iw]
    for iw in range(W-1,0,-1):
        if cut[ih][iw-1] ==0:
            cut[ih][iw-1]= cut[ih][iw]
        
for ih in range(H-1):
    if cut[ih+1][0]==0:
        for iw in range(W):
            cut[ih+1][iw] = cut[ih][iw]
for ih in range(H-1,0,-1):
    if cut[ih-1][0]==0:
        for iw in range(W):
            cut[ih-1][iw] = cut[ih][iw]
for i in range(H):
    print(*cut[i])
Buggy python submission (verdict: Time Limit Exceeded):
#abc145_d
import math
m = 10**9+7
x,y = map(int,input().split())

a = max(x,y)
b = min(x,y)
cnt = 0

while a -b-100 >100:
    a -=200
    b -=100
    cnt +=100


while a != b:
    a -= 2
    b -= 1
    cnt +=1

    if a<0 or b <0:
        print(0)
        exit()
if a%3 != 0:
    print(0)
    exit()
else:
    c = a//3

n = (math.factorial(2*c+cnt)%m)*(pow(math.factorial(c+cnt),m-2,m))*(pow(math.factorial(c),m-2,m))
print(n%m)


Fixed submission:
#abc145_d
m = 10**9+7
x,y = map(int,input().split())
fac =[0]*(10**6+1)
a = max(x,y)
b = min(x,y)
cnt = 0
fac[0]=1

while a != b:
    a -= 2
    b -= 1
    cnt +=1
    fac[cnt] = (fac[cnt-1]*cnt)%m

    if a<0 or b <0:
        print(0)
        exit()
c = a//3
d = cnt
if a%3 != 0:
    print(0)
    exit()
    
else:
    while a != 0:
        a -= 1
        b -= 2
        cnt +=1
        fac[cnt] = (fac[cnt-1]*cnt)%m

        a -= 2
        b -= 1
        cnt +=1
        fac[cnt] = (fac[cnt-1]*cnt)%m

n = ((fac[cnt])%m)*(pow(fac[c+d],m-2,m))*(pow(fac[c],m-2,m))
print(n%m)
Buggy python submission (verdict: Runtime Error):
N,K = list(map(int,input().split()))
H  = list(map(int,input().split()))
counter = 0
for h in H:
  if h >= K:
    couter += 1
    
print(counter)

Fixed submission:
import bisect
N,K =list(map(int,input().split()))
H =sorted(list(map(int,input().split())))
i = bisect.bisect(H,K-1)
print(N-i)
Buggy python submission (verdict: Runtime Error):
H,W,A,B = list(map(int,input().split()))
M = [[0]*W for _ in range(H)]



for ih in range(H):
    for iw in range(W):
        if (ih<B and iw <S) or (ih>=B and iw >= A):
            M[ih][iw] = 1
    for i in range(H):
        print(''.join(list(map(str,M[i]))))

Fixed submission:
H,W,A,B = list(map(int,input().split()))
M = [[0]*W for _ in range(H)]



for ih in range(H):
    for iw in range(W):
        if (ih<B and iw <A) or (ih>=B and iw >= A):
            M[ih][iw] = 1
for i in range(H):
    print(''.join(list(map(str,M[i]))))

Buggy python submission (verdict: Runtime Error):
H,W,A,B = list(map(int,input().split()))
M = [[0]*W for _ in range(W)]

if H == 1 or W == 1:
    a = max(A,B)
    for i in range(H):
        for j in range(W):
            if a>0:
                M[i][j] = 1
                a-=1
    for i in range(H):
        print(''.join(list(map(str,M[i]))))
        
elif A == 0:
    a = B
    for i in range(H):
        for j in range(W):
            if a>0:
                M[i][j] = 1
        a -=1
    for i in range(H):
        print(''.join(list(map(str,M[i]))))

    
elif B == 0:
    a = A
    for i in range(W):
        for j in range(H):
            if a>0:
                M[i][j] = 1
        a -=1
    for i in range(H):
        print(''.join(list(map(str,M[i]))))

elif A == B and H == W:
    for i in range(H):
        for j in range(W):
            if (j+i)%W < A:
                M[i][j]=1

    for i in range(H):
        print(''.join(list(map(str,M[i]))))

else:
    print('No')
    


Fixed submission:
H,W,A,B = list(map(int,input().split()))
M = [[0]*W for _ in range(H)]



for ih in range(H):
    for iw in range(W):
        if (ih<B and iw <A) or (ih>=B and iw >= A):
            M[ih][iw] = 1
for i in range(H):
    print(''.join(list(map(str,M[i]))))

Buggy python submission (verdict: Runtime Error):
H,W,A,B = list(map(int,input().split()))
M = [[0]*W for _ in range(W)]

if H == 1 or W == 1:
    a = max(A,B)
    for i in range(H):
        for j in range(W):
            if a>0:
                M[i][j] = 1
                a-=1
    for i in range(H):
        print(*M[i])
        
elif A == 0:
    a = B
    for i in range(H):
        for j in range(W):
            if a>0:
                M[i][j] = 1
        a -=1
    for i in range(H):
        print(*M[i])

    
elif B == 0:
    a = A
    for i in range(W):
        for j in range(H):
            if a>0:
                M[i][j] = 1
        a -=1
    for i in range(H):
        print(*M[i])

elif A == B and H == W:
    for i in range(H):
        for j in range(W):
            if (j+i)%W < A:
                M[i][j]=1

    for i in range(H):
        print(*M[i])

else:
    print('No')
    


Fixed submission:
H,W,A,B = list(map(int,input().split()))
M = [[0]*W for _ in range(H)]



for ih in range(H):
    for iw in range(W):
        if (ih<B and iw <A) or (ih>=B and iw >= A):
            M[ih][iw] = 1
for i in range(H):
    print(''.join(list(map(str,M[i]))))
Buggy python submission (verdict: Time Limit Exceeded):
import sys,math,collections,itertools
input = sys.stdin.readline

N,K=list(map(int,input().split()))
S=input().rstrip()

ori_num=0
turn_num=0
for i in range(N):
    if i>0:
        if S[i-1] =='L' and S[i] =='L':
            ori_num += 1
        if S[i-1] != S[i]:
            turn_num +=1
        
    if i<N-1:
        if S[i] =='R' and S[i+1] =='R':
            ori_num += 1
while K:
    if turn_num >1:
        turn_num -= 2
        K -= 1
        ori_num += 2
    elif turn_num ==1:
        ori_num +=1
        K=0
print(ori_num)


Fixed submission:
import sys,math,collections,itertools
input = sys.stdin.readline

N,K=list(map(int,input().split()))
S=input().rstrip()

ori_num=0
turn_num=0
for i in range(N):
    if i>0:
        if S[i-1] =='L' and S[i] =='L':
            ori_num += 1
        if S[i-1] != S[i]:
            turn_num +=1
        
    if i<N-1:
        if S[i] =='R' and S[i+1] =='R':
            ori_num += 1

if turn_num >=2*K:
    ori_num += 2*K
else:
    num = turn_num//2
    num2 = turn_num%2
    ori_num += 2*num+num2
    
print(ori_num)
Buggy python submission (verdict: Runtime Error):
min_tap = 0
if B <= A:
    min_tap = 1
else:
    min_tap =math.ceil((B-A)/(A-1))+1
print(int(min_tap))

Fixed submission:
import math
A,B= list(map(int,input().split()))
#for i in range(1,22):
#    if (A-1)*(i-1)+A >=B:
#        print(i)
#        break
print(math.ceil((B-A)/(A-1))+1)
Buggy python submission (verdict: Runtime Error):
K,X = map(int,input().split())
print(*range(X-K-+1,X+K)))

Fixed submission:
K,X = map(int,input().split())
x = " ".join(map(str,list(range(X-K+1,X+K))))
print(x)
Buggy python submission (verdict: Runtime Error):
print(3*a**2)

Fixed submission:
print(3*int(input())**2)
Buggy python submission (verdict: Time Limit Exceeded):
import bisect
N= int(input())
dp = [-1]*N
cnt =0
for i in range(N):
    a = int(input())
    idx = bisect.bisect_left(dp[N-i-1:],a)
    dp[(N-i-1)+idx-1]=a
print(len(dp[bisect.bisect_left(dp,0):]))


Fixed submission:
import bisect
N= int(input())
dp = [-1]*N
cnt =0
for _ in range(N):
    a = int(input())
    idx = bisect.bisect_left(dp,a)
    dp[idx-1]=a
print(len(dp[bisect.bisect_left(dp,0):]))

Buggy python submission (verdict: Time Limit Exceeded):
N= int(input())
dp = [-1]*N
cnt =0
for _ in range(N):
    a = int(input())
    for i in range(N):
        if dp[i]<a:
            dp[i]=a
            cnt = max(cnt,i)
            break
print(cnt+1)


Fixed submission:
import bisect
N= int(input())
dp = [-1]*N
cnt =0
for _ in range(N):
    a = int(input())
    idx = bisect.bisect_left(dp,a)
    dp[idx-1]=a
print(len(dp[bisect.bisect_left(dp,0):]))

Buggy python submission (verdict: Time Limit Exceeded):
N= int(input())
dp = [-1]*N
cnt =0
for _ in range(N):
    a = int(input())
    for i in range(N):
        if dp[i]<a:
            dp[i]=a
            cnt = max(cnt,i)
            break
print(cnt+1)


Fixed submission:
import bisect
N= int(input())
dp = [-1]*N
cnt =0
for _ in range(N):
    a = int(input())
    idx = bisect.bisect_left(dp,a)
    dp[idx-1]=a
print(len(dp[bisect.bisect_left(dp,0):]))
Buggy python submission (verdict: Runtime Error):
N,A,B,C,D =list(map(int,input().split()))
s = input()
flag = 0
if C<D:
    if (s[B-1:D].count('##') == 0) and (s[A-1:C].count('##') == 0):
        print('Yes')
    else:
        print('No')
else:
    if (s[B-1:C].count('...')>=1) and (s[A-1:C].count('##')==0):
        print('Yes')
    else:
        print('No')


Fixed submission:
import sys,collections
input = sys.stdin.readline

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

if sum(a) == 0:
    print('Yes')
    exit()

if N%3 != 0:
    print('No')
    exit()    

ac = collections.Counter(a)

if len(ac) == 2 and ac[0] ==N/3:
    print('Yes')
    exit()


if len(ac) != 3 :
    print('No')
    exit()
else:
    lk1,lk2,lk3 = ac.keys()
    lv1,lv2,lv3 = ac.values()
if lv1 == lv2 ==lv3:
    if lk1^lk2 == lk3:
        print('Yes')
    else:
        print('No')
else:
    print('No')
    exit()
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
c = 0
for i in range(1,n+1):
  if p[i-1] == min(p[:i]):
    c += 1
print(c)


Fixed submission:
n = int(input())
p = list(map(int,input().split()))
c = 0
m = p[0]
for i in range(n):
    if p[i] <= m :
        m = p[i]
        c += 1
print(c)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
c = 0
for i in range(1,n+1):
  if p[i-1] == min(p[:i]):
    c += 1
print(c)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
c = 0
m = p[0]
for i in range(n):
    if p[i] <= m :
        m = p[i]
        c += 1
print(c)
Buggy python submission (verdict: Runtime Error):
k,x=map(int,input().split())

if 500*k=>x:
  print("Yes")
else:
  print("No")

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

if 500*k>=x:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
a = list(map(int,input().split()))

if sum(a) >=22:
    print(bust)
else:
    print(win)

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

if sum(a) >= 22:
    print("bust")
else:
    print("win")

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

if sum(a) >=22:
    print(bust)
else:
    print(win)

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

if sum(a) >= 22:
    print("bust")
else:
    print("win")

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

if sum(a) =>22:
    print(bust)
else:
    print(win)

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

if sum(a) >= 22:
    print("bust")
else:
    print("win")

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

if a+b+c => 22:
  print(bust)
else:
  print(win)


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

if sum(a) >= 22:
    print("bust")
else:
    print("win")

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

if a+b+c >= 22:
  print(bust)
else:
  print(win)


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

if sum(a) >= 22:
    print("bust")
else:
    print("win")

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

if a+b+c>21:
  print(bust)
else:
  print(win)

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

if sum(a) >= 22:
    print("bust")
else:
    print("win")
Buggy python submission (verdict: Runtime Error):
s = str(input())
 
if s == "SUN":
  print(7)
elif s == "MON":
  print(6)
elif s == "TUE":
  print(5)
elif s == "WED":
  print(4)
elif s == "THU":
  print(3)
elif s == "FRI":
  print(2)
else s == "SUT":
  print(1)

Fixed submission:
s = str(input())
 
if s == "SUN":
  print(7)
elif s == "MON":
  print(6)
elif s == "TUE":
  print(5)
elif s == "WED":
  print(4)
elif s == "THU":
  print(3)
elif s == "FRI":
  print(2)
else:
  print(1)

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

if s = "SUM":
  print(7)
elif s = "MON":
  print(6)
elif s = "TUE":
  print(5)
elif s = "WED":
  print(4)
elif s = "THU":
  print(3)
elif s = "FRI":
  print(2)
else s = "SUT":
  print(1)
  

Fixed submission:
s = str(input())
 
if s == "SUN":
  print(7)
elif s == "MON":
  print(6)
elif s == "TUE":
  print(5)
elif s == "WED":
  print(4)
elif s == "THU":
  print(3)
elif s == "FRI":
  print(2)
else:
  print(1)
Buggy python submission (verdict: Runtime Error):
r = int(input())

print((r*r)

Fixed submission:
r = int(input())

print(r*r)
Buggy python submission (verdict: Runtime Error):
import sys
n = int(input())
ans = 10**12

for k in range(1,(n+1)**0.5):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
        else:
            print(ans)
            sys.exit()
print(ans)

Fixed submission:
n = int(input())
ans = 10**12

for k in range(1,int((n)**0.5)+2):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import sys
n = int(input())
ans = 10**12

for k in range(1,n+1//2):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
        else:
            print(ans)
            sys.exit()
print(ans)

Fixed submission:
n = int(input())
ans = 10**12

for k in range(1,int((n)**0.5)+2):
    if n%k == 0 :
        m = n//k + k - 2
        if ans > m:
            ans = m
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
    b.append(a.index(i+1)+1)

print(*b)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
d = dict()
for i in range(n):
    d[a[i]] = i+1

ans = []

for j in range(n):
    ans.append(d.get(j+1))

print(*ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(n):
    b.append(a.index(i+1)+1)

print(*b)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
d = dict()
for i in range(n):
    d[a[i]] = i+1

ans = []

for j in range(n):
    ans.append(d.get(j+1))

print(*ans)
Buggy python submission (verdict: Runtime Error):
s = str(input())

if s == "Sunny":
    print(Cloudy)
elif s == "Cloudy":
    print(Rainy)
else:
    print(Sunny)

Fixed submission:
s = str(input())

if s == "Sunny":
    print("Cloudy")
elif s == "Cloudy":
    print("Rainy")
else:
    print("Sunny")
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = list(map(int,input().split()))
result = []
c = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        c += 1
    else:
        result.append(c)
        c = 0
    if i == n-2:
        result.append(c)

print(max(result))

Fixed submission:
import sys
n = int(input())
h = list(map(int,input().split()))
result = []
c = 0
if n == 1:
    print(0)
    sys.exit()
for i in range(n-1):
    if h[i] >= h[i+1]:
        c += 1
    else:
        result.append(c)
        c = 0
    if i == n-2:
        result.append(c)

print(max(result))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = list(map(int,input().split()))
c = 0
for i in range(n-1):
    count = 0
    for j in range(i,n-1):
        if h[j] >= h[j+1]:
            count += 1
        else:
            break
        if count > c:
            c = count
print(c)

Fixed submission:
import sys
n = int(input())
h = list(map(int,input().split()))
result = []
c = 0
if n == 1:
    print(0)
    sys.exit()
for i in range(n-1):
    if h[i] >= h[i+1]:
        c += 1
    else:
        result.append(c)
        c = 0
    if i == n-2:
        result.append(c)

print(max(result))

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
h = list(map(int,input().split()))
c = 0
for i in range(n-1):
    count = 0
    for j in range(i,n-1):
        if h[j] >= h[j+1]:
            count += 1
        else:
            break
        if count > c:
            c = count
print(c)

Fixed submission:
import sys
n = int(input())
h = list(map(int,input().split()))
result = []
c = 0
if n == 1:
    print(0)
    sys.exit()
for i in range(n-1):
    if h[i] >= h[i+1]:
        c += 1
    else:
        result.append(c)
        c = 0
    if i == n-2:
        result.append(c)

print(max(result))
Buggy python submission (verdict: Runtime Error):
k,x = map(int,input().split())
p = [x-k+1+i for i in range(2*k-1)]
print(q)

Fixed submission:
k,x = map(int,input().split())
p = [x-k+1+i for i in range(2*k-1)]
q = [str(j) for j in p]
r = " ".join(q)
print(r)
Buggy python submission (verdict: Runtime Error):
import math
import sys
a,b,c,d = map(int,input().split())

if (c == 1) or (d == 1):
    print(0)
    sys.exit()

c_all  = b//c
d_all  = b//d
cd_all = int(b//(c*d/math.gcd(c,d)))
count_all = b + cd_all - c_all - d_all

c_a  = (a-1)//c
d_a  = (a-1)//d
cd_a = int((a-1)//(c*d/math.gcd(c,d)))
count_a = a - 1 + cd_a - c_a - d_a

print(count_all - count_a)

Fixed submission:
import sys
s = list(input())

for i in range(1,4):
    if s[i-1] == s[i]:
        print("Bad")
        sys.exit()

print("Good")
Buggy python submission (verdict: Runtime Error):
s = list(input())

for i in range(4):
    s[i] = int(s[i])

a = s[0]*10 + s[1]
b = s[2]*10 + s[3]


elif a >= 13 and b >= 13:
    print("NA")
elif a >= 13 and b <= 12:
    if b > 0:
        print("YYMM")
    else:
        print("NA")
elif a <= 12 and b >= 13:
    if a > 0:
        print("MMYY")
    else:
        print("NA")
else:
    if a == 0 or b == 0:
        print("NA")
    else:
        print("AMBIGUOUS")

Fixed submission:
s = list(input())

for i in range(4):
    s[i] = int(s[i])

a = s[0]*10 + s[1]
b = s[2]*10 + s[3]


if a >= 13 and b >= 13:
    print("NA")
elif a >= 13 and b <= 12:
    if b > 0:
        print("YYMM")
    else:
        print("NA")
elif a <= 12 and b >= 13:
    if a > 0:
        print("MMYY")
    else:
        print("NA")
else:
    if a == 0 and b == 0:
        print("NA")
    elif a == 0:
        print("YYMM")
    elif b == 0:
        print("MMYY")
    else:
        print("AMBIGUOUS")
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
result = 0

for i in range(2**n):
    list_v = []
    list_c = []
    for j in range(n):
        if (i >> j) &1 ==1:
            list_v.append(v[j])
            list_c.append(c[j])
    if sum(list_v) - sum(list_c) >= result:
        result = sum(list_v) - sum(list_c)

print(result)

Fixed submission:
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
result = 0

for i in range(2**n):
    list_v = []
    list_c = []
    for j in range(n):
        if (i >> j) &1 ==1:
            list_v.append(v[j])
            list_c.append(c[j])
    if sum(list_v) - sum(list_c) >= result:
        result = sum(list_v) - sum(list_c)

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
result = []

for i in range(2**n):
    list_v = []
    list_c = []
    for j in range(n):
        if (i >> j) &1 ==1:
            list_v.append(v[j])
            list_c.append(c[j])
    result.append(sum(list_v)-sum(list_c))

print(max(result))

Fixed submission:
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))
result = 0

for i in range(2**n):
    list_v = []
    list_c = []
    for j in range(n):
        if (i >> j) &1 ==1:
            list_v.append(v[j])
            list_c.append(c[j])
    if sum(list_v) - sum(list_c) >= result:
        result = sum(list_v) - sum(list_c)

print(result)
Buggy python submission (verdict: Runtime Error):
s = list(input())
count = []
x = ["A","T","G","C"]
c = 0
for i in range(len(s)):
    if (s[i] in x) == True:
        c += 1
    else:
        count.append(c)
        c = 0

print(max(count))

Fixed submission:
s = list(input())
ans = 0
x = ["A","T","G","C"]
c = 0
for i in range(len(s)):
    if (s[i] in x) == True:
        c += 1
        if ans < c:
            ans = c
    else:
        c = 0
print(ans)