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

Fixed submission:
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for i in range(X, Y+1):
  if X < i <= Y and max(x) < i <= min(y):
    print("No War")
    exit()
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for i in range(X, Y+1):
  if X < i <= Y and max(x) < i <= min(y):
    print("No War")
    exit(1)
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for i in range(X, Y):
  if X < i <= Y and max(x) < i <= min(y):
    print("No War")
    exit(1)
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for i in range(X, Y):
   if X < i <= Y and max(x) < i <= min(y):
             print("No War")
             exit(1)
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
for i in range(X, Y+1):
   if X < i <= Y and max(x) < i <= min(y):
             print("No War")
             exit(1)
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
if max(x) < min(y):
    for i in range(max(x),min(y)+1):
        if max(x) < i <= min(y) and X < i <= Y:
             print("No War")
             exit(1)
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(map(int, input().split()))
y = list(map(int, input().split()))
if max(x) < min(y):
    for i in range(max(x),min(y)+1):
        if max(x) < i <= min(y):
             print("No War")
             exit(1)
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(int(input())
y = list(int(input())
if max(x) < min(y):
    for i in range(max(x),min(y)):
        if max(x) < i <= min(y):
             print("No War")
             break
print("War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
x = list(int(input())
y = list(int(input())
for i in range(max(x),min(y)):
    if max(x) < i <= min(y):
         print("No War")
    else:
         print("War")
Problem p03281 (python)

Fixed submission:
N = int(input())
count1 = 0
for i in range(1,N+1):
  if i % 2 != 0: #Odd Number
    count2 = 0  
    for j in range(1,i+1):
      if i % j == 0:
        count2 += 1
      if count2 == 8:
        count1 += 1
print(count1)

Buggy submission (verdict: Runtime Error):
N = int(input())
count1 = 0
for i in range(1,N+1):
  if i % 2 != 0:
  	count2 = 0  
    for j in range(1,i+1):
      if i % j == 0:
        count2 += 1
      if count2 == 8:
        count1 += 1
print(count1)
Problem p03288 (python)

Fixed submission:
N = int(input())
if N < 1200:
  print('ABC')
elif N < 2800:
  print('ARC')
else:
  print('AGC')

Buggy submission (verdict: Runtime Error):
S = input()
count = 0
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception = [0]
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"
    

print(answer)
Problem p03289 (python)

Fixed submission:
S = input()
count = 0
exception = [0]
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"

print(answer)

Buggy submission (verdict: Runtime Error):
S = input()
count = 0
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception = [0]
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            count += 1

if count == len(S)-2:
    answer = "AC"
    

print(answer)

Buggy submission (verdict: Runtime Error):
S = input()
answer = "WA"

if S[0] == 'A' and S[2:-1].count('C') == 1:
    C = S.index('C')
    exception = [0]
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Buggy submission (verdict: Runtime Error):
S = input()
count = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            count += 1

if count == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) == 2:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Buggy submission (verdict: Runtime Error):
S = input()
count = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            count += 1

if count == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Buggy submission (verdict: Runtime Error):
S = input()
count1 = 0
count2 = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        if S[i] == 'C':
            count1 += 1

if count1 == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)

Buggy submission (verdict: Runtime Error):
S = input()
count1 = 0
count2 = 0
answer = "WA"

if S[0] == 'A':
    exception = [0]
    for i in range(2,len(S)-1):
        print(i)
        if S[i] == 'C':
            count1 += 1

if count1 == 1:
    C = S.index('C')
    exception.append(C)

if len(exception) > 1:
    for j in range(len(S)):
        if j not in exception and S[j].islower():
            answer = "AC"

print(answer)
Problem p03316 (python)

Fixed submission:
N = input()
nums = list(N)
count = 0
for i in nums:
  count += int(i)

if int(N) % count == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = input()
nums = list(N)
count = 0
for i in nums:
  count += i

if int(N) % count == 0:
  print("Yes")
else:
  print("No")
Problem p03386 (python)

Fixed submission:
mi, ma, num = map(int,input().split())
ans = []
if num <= ma-mi+1:
  for i in range(mi,mi+num):
    ans.append(i)
  for j in range(ma-num+1,ma+1):
    if j not in ans:
      ans.append(j)
  for k in ans:
    print(k)
else:
  for l in range(mi,ma+1):
    print(l)

Buggy submission (verdict: Runtime Error):
mi, ma, num = map(int,input().split())
ans = []
if num <= ma-mi+1
  for i in range(mi,mi+num):
    ans.append(i)
  for j in range(ma-num+1,ma+1):
    if j not in ans:
      ans.append(j)
  for k in ans:
    print(k)
else:
  for l in range(mi,ma+1):
    print(l)
Problem p03399 (python)

Fixed submission:
fee = []
ans = 0
for i in range(4):
  fee.append(int(input()))
ans += min(fee[0], fee[1])
ans += min(fee[2], fee[3])
print(ans)

Buggy submission (verdict: Runtime Error):
fee = []
for i in range(4):
  fee.append(int(input()))
ans += mix(fee[0], fee[1])
ans += mix(fee[2], fee[3])
print(ans)
Problem p03407 (python)

Fixed submission:
A,B,C = map(int, input().split())
if A+B >= C:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
A,B,C = map(int, input().split())
if A+B == C:
  print("Yes")
else:
  prin("No")
Problem p03433 (python)

Fixed submission:
N = int(input())
A = int(input())
if N % 500 <= A:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = int(input())
if N % 500 <= A
    print("Yes")
else:
    print("No")
Problem p03474 (python)

Fixed submission:
A,B = map(int, input().split())
a= input().split('-')
if len(a[0]) == A and len(a[1]) == B:
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
a,b = int(input().split('-'))
if len(a) == A and len(b) == B:
  print('Yes')
else:
  print('No')
Problem p03477 (python)

Fixed submission:
weight = input().split(" ")
if int(weight[0]) + int(weight[1]) > int(weight[2]) + int(weight[3]):
  print("Left")
elif int(weight[0]) + int(weight[1]) == int(weight[2]) + int(weight[3]):
  print("Balanced")
else:
  print("Right")

Buggy submission (verdict: Runtime Error):
weight = input().split(" ")
if weight[0] + weight[1] > weight[2] + weight[3]:
  print("Left")
elif weight[0] + weight[1] = weight[2] + weight[3]:
  print("Balanced")
else:
  print("Right")
Problem p03493 (python)

Fixed submission:
a = list(input())
count = 0
for i in range(len(a)):
  if a[i] == "1":
    count += 1
print(count)

Buggy submission (verdict: Runtime Error):
a = list(int(input()))
count = 0
for i in range(len(a)):
  if a[i] == 1:
    count += 1
print(count)
Problem p03494 (python)

Fixed submission:
N = input()
nums = input().split()
count = 0
while all(int(num) % 2 == 0 for num in nums):
  for i in range(len(nums)):
    nums[i] = int(nums[i]) // 2
  count += 1
print(count)

Buggy submission (verdict: Runtime Error):
nums = int(input().split())
count = 0
while all(num%2==0 for num in nums):
  for i in range(len(nums)):
    nums[i] = nums[i]/2
    count += 1
print(count)
Problem p03502 (python)

Fixed submission:
n = input()
N = list(n)
sum = 0
for i in range(len(N)):
  sum += int(N[i])
  
if int(n) % sum == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
N = list(n)
sum = 0
for i in range(len(N)):
  sum += N[i]
  
if n % sum == 0:
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
n = int(input())
N = list(int(input()))
sum = 0
for i in range(len(N)):
  sum += N[i]
  
if n % sum == 0:
  print("Yes")
else:
  print("No")
Problem p03543 (python)

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

Buggy submission (verdict: Runtime Error):
N = list(map(int, input().split()))
if (N[0] == N[1] and N[1] == N[2]) or (N[1] == N[2] and N[2] == N[3]):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
N = list(map(int, input().split()))
if N[0] == N[1] == N[2] or N[1] == N[2] == N[3]:
  print("Yes")
else:
  print("No")
Problem p03544 (python)

Fixed submission:
N = int(input())
ans = [2,1]
for i in range(2,N+1):
  a = ans[i-2] + ans[i-1]
  ans.append(a)
print(ans[len(ans)-1])

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = [2,1]
for i in range(2,N):
  a = ans[i-2] + ans[i-1]
  ans.append(a)
print(ans[len(ans)])
Problem p03632 (python)

Fixed submission:
A,B,C,D = map(int, input().split())
print(max(min(B,D)-max(A,C), 0))

Buggy submission (verdict: Runtime Error):
A,B,C,D = map(int, input().split())
if C < B:
  if D < B:
    print(D-C)
  else:
	print(B-C)
else:
  print(0)
Problem p03693 (python)

Fixed submission:
number = list(map(str, input().split(" ")))
N = "".join(number)
if int(N) % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
number = "".join(input())
if int(number) % 4 == 0:
  print("YES")
else:
  print("NO")

Buggy submission (verdict: Runtime Error):
number = "".join(int(input()))
if number % 4 == 0:
  print("YES")
else:
  print("NO")
Problem p03737 (python)

Fixed submission:
a,b,c = map(str, input().split())
print(str(a[0].upper())+str(b[0].upper())+str(c[0].upper()))

Buggy submission (verdict: Runtime Error):
a,b,c = map(str, input().split())
print(str(a[0].uppercase)+str(b[0].uppercase)+str(c[0].uppercase))
Problem p03773 (python)

Fixed submission:
A,B = map(int, input().split())
print((A+B) % 24)

Buggy submission (verdict: Runtime Error):
A,B = map(int, input().split())
print(sum(A,B)%24)
Problem p03778 (python)

Fixed submission:
W,a,b = map(int,input().split())
start = max(a, b)
end = min(a+W, b+W)
print(max(start-end, 0))

Buggy submission (verdict: Runtime Error):
W,a,b = map(int,input().split())
start = max(a, b)
end = min(a+W, b+W)
print(max(start-end), 0)
Problem p03844 (python)

Fixed submission:
A, op, B = map(str, input().split())
if op == "+":
  print(int(A)+int(B))
else:
  print(int(A)-int(B))

Buggy submission (verdict: Runtime Error):
A, op, B = map(str, inpit().split())
if op == "+":
  print(int(A)+int(B))
else:
  print(int(A)-int(B))
Problem p03860 (python)

Fixed submission:
AtCoder, s, Contest = map(str, input().split())
print("A" + str(s[0]) + "C")

Buggy submission (verdict: Runtime Error):
AtCoder, s, Contest = map(str, input().split())
print(A + str(s[0]) + C)
Problem p03943 (python)

Fixed submission:
candy = list(map(int, input().split(" ")))
if sum(candy)-max(candy) == max(candy):
  print("Yes")
else:
  print("No")

Buggy submission (verdict: Runtime Error):
candy = input().split(" ")
if sum(candy)-max(candy) == max(candy):
  print("Yes")
else:
  print("No")
Problem p04030 (python)

Fixed submission:
s = list(input())
ans = []
for i in s:
  if i == '0':
    ans.append('0')
  elif i == '1':
    ans.append('1')
  else:
    if len(ans) == 0:
      pass
    else:
      ans.pop()
print("".join(ans))

Buggy submission (verdict: Runtime Error):
s = list(input())
ans = []
for i in s:
  if i == '0':
    ans.append('0')
  elif i == '1':
    ans.append('1')
  else:
    ans.pop()
print("".join(ans))
Problem p02802 (python)

Fixed submission:
F_str = input().split()
F = [int(f) for f in F_str]
N = F[0]
M = F[1]

WA_list = [0 for _ in range(N)]
AC_list = [0 for _ in range(N)]

for i in range(M):
    S_str = input().split()
    S = [str(s) for s in S_str]
    if(S[1] == "AC"):
        AC_list[int(S[0])-1] = 1
    elif(AC_list[int(S[0])-1] != 1):
        WA_list[int(S[0])-1] += 1

WA_count = 0
AC_count = 0

for i in range(N):
    if(AC_list[i] == 1):
        AC_count += 1
        WA_count += WA_list[i]

print(AC_count, WA_count)

Buggy submission (verdict: Runtime Error):
F_str = input().split()
F = [int(f) for f in F_str]
N = F[0]
M = F[1]

WA_list = [0 for _ in range(N)]
AC_list = []

for i in range(M):
    S_str = input().split()
    S = [str(s) for s in S_str]
    if(S[1] == "AC"):
        AC_list.append(S[0])
        AC_list = list(set(AC_list))
    elif(not(S[0] in AC_list)):
        WA_list[int(S[0])-1] += 1
        
WA_count = 0

for item in AC_list:
    WA_count += WA_list[int(item)-1]

print(str(len(AC_list)) + " " + str(sum(WA_count)))

Buggy submission (verdict: Runtime Error):
F_str = input().split()
F = [int(f) for f in F_str]
N = F[0]
M = F[1]

WA_list = [0 for _ in range(N)]
AC_list = []

for i in range(M):
    S_str = input().split()
    S = [str(s) for s in S_str]
    if(S[1] == "AC"):
        AC_list.append(S[0])
    elif(not(S[0] in AC_list)):
        WA_list[int(S[0])-1] += 1

AC_set = list(set(AC_list))

WA_count = 0

for item in AC_set:
    WA_count += WA_list[int(item)-1]

print(str(len(AC_set)) + " " + str(sum(WA_count)))
Problem p02811 (python)

Fixed submission:
S = input().split()
K = int(S[0])
X = int(S[1])

if(500*K >= X):
    print("Yes")
else:
    print("No")

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

count = 0

for i in range(len(s)-2):
    if(s[i]+s[i+1]+s[i+2]=="ABC"):
        count += 1

print(count)
Problem p02945 (python)

Fixed submission:
row = input().split()
a = int(row[0])
b = int(row[1])

print(max(a+b, a-b, a*b))

Buggy submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
from math import factorial

n = int(input())
strlist = []
for i in range(n):
    strlist.append(list(str(input())))

allcount = 0
while (len(strlist) > 1):
    i = 1
    count = 1
    while True:
        if(set(strlist[0]) == set(strlist[i])):
            count += 1
            strlist.pop(i)
        else:
            i += 1
        if(i==len(strlist)):
            if(count > 1):
                allcount += int(factorial(count) / factorial(2) / factorial(count-2))
            break
    strlist.pop(0)
print(allcount)
Problem p03436 (python)

Fixed submission:
from collections import deque
if __name__ == "__main__":
    h, w = map(int, input().split())
    grid = []
    for _ in range(h):
        grid.append(input())
    
    white = 0
    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                white += 1
    
    qu = deque()
    qu.append(((0, 0), 0))
    
    visited = [[False] * w for _ in range(h)]
    visited[0][0] = True
    ans = -1

    while qu:
        now, dis = qu.pop()
        if now[0] == h-1 and now[1] == w-1:
            ans = white - dis - 1
            break

        if now[0] + 1 < h and grid[now[0] + 1][now[1]] != "#" and not visited[now[0] + 1][now[1]]:
            visited[now[0] + 1][now[1]] = True
            qu.appendleft(((now[0] + 1, now[1]), dis + 1))
        
        if now[0] - 1 >= 0 and grid[now[0] - 1][now[1]] != "#" and not visited[now[0] - 1][now[1]]:
            visited[now[0] - 1][now[1]] = True
            qu.appendleft(((now[0] - 1, now[1]), dis + 1))

        if now[1] + 1 < w and grid[now[0]][now[1] + 1] != "#" and not visited[now[0]][now[1] + 1]:
            visited[now[0]][now[1] + 1] = True
            qu.appendleft(((now[0], now[1] + 1), dis + 1))
        
        if now[1] - 1 >= 0 and grid[now[0]][now[1] - 1] != "#" and not visited[now[0]][now[1] - 1]:
            visited[now[0]][now[1] - 1] = True
            qu.appendleft(((now[0], now[1] - 1), dis + 1))
    print(ans)

Buggy submission (verdict: Runtime Error):
from collections import deque
if __name__ == "__main__":
    h, w = map(int, input().split())
    grid = []
    for _ in range(h):
        grid.append(input())
    
    white = 0
    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                white += 1
    
    qu = deque()
    qu.append(((0, 0), 0))
    
    visited = [[False] * w for _ in range(h)]
    visited[0][0] = True
    ans = 0

    while True:
        now, dis = qu.pop()
        if now[0] == h-1 and now[1] == w-1:
            ans = white - dis - 1
            break

        if now[0] + 1 < h and grid[now[0] + 1][now[1]] != "#" and not visited[now[0] + 1][now[1]]:
            visited[now[0] + 1][now[1]] = True
            qu.appendleft(((now[0] + 1, now[1]), dis + 1))
        
        if now[0] - 1 >= 0 and grid[now[0] - 1][now[1]] != "#" and not visited[now[0] - 1][now[1]]:
            visited[now[0] - 1][now[1]] = True
            qu.appendleft(((now[0] - 1, now[1]), dis + 1))

        if now[1] + 1 < w and grid[now[0]][now[1] + 1] != "#" and not visited[now[0]][now[1] + 1]:
            visited[now[0]][now[1] + 1] = True
            qu.appendleft(((now[0], now[1] + 1), dis + 1))
        
        if now[1] - 1 >= 0 and grid[now[0]][now[1] - 1] != "#" and not visited[now[0]][now[1] - 1]:
            visited[now[0]][now[1] - 1] = True
            qu.appendleft(((now[0], now[1] - 1), dis + 1))
    print(ans)
Problem p02612 (python)

Fixed submission:
N = int(input())
N = str(N)

if len(N) == 2:
    b = int(N[-2])
    c = int(N[-1])
    x = 10*b + c
elif len(N) == 1:
    c = int(N[-1])
    x = c
else:
    a = int(N[-3])
    b = int(N[-2])
    c = int(N[-1])
    x = 100*a + 10*b + c
ans = 1000 - x
if ans == 1000:
    ans = 0
print(ans)

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

a = int(N[-3])
b = int(N[-2])
c = int(N[-1])
x = 100*a + 10*b + c
ans = 1000 - x
if ans == 1000:
    ans = 0
print(ans)
Problem p02658 (python)

Fixed submission:
N = int(input())
l = list(map(int,input().split()))
l.sort()
ans = 1
rec = True
for i in range(N):
    ans = ans * l[i]
    if ans > 10**18:
        rec = False
        break

if rec:
    print(ans)
else:
    print('-1')

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

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

x = functools.reduce(operator.mul, A)
y = 10**18


if x > y:
    print("-1")
else:
    print(x)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
x = 1
y = 10**18

x = np.prod(A)
if x > y:
    print("-1")
else:
    print(x)
Problem p02677 (python)

Fixed submission:
import math
from math import cos,pi,sqrt,radians

A, B, H, M = map(float, input().split())

m_theta = (M/60.0)*2*pi
h_theta = 1/12.0*(H + M/60.0) * 2* pi
mh_theta = abs(m_theta - h_theta)

x = A**2 + B**2 - 2*A*B*cos(mh_theta)
x = sqrt(x)
print(x)

Buggy submission (verdict: Runtime Error):
A, B, H, M = map(float, input().split())

m_theta = (M/60.0)*2*pi
h_theta = 1/12.0*(H + M/60.0) * 2* pi
mh_theta = abs(m_theta - h_theta)

x = A**2 + B**2 - 2*A*B*cos(mh_theta)
x = sqrt(x)
print(x)

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

m_theta = (M/60)*2*pi
h_theta = 1/12*(H + M/60) * 2* pi
mh_theta = abs(m_theta - h_theta)

x = A**2 + B**2 - 2*A*B*cos(mh_theta)
x = sqrt(x)
print(x)
Problem p02718 (python)

Fixed submission:
N, M = map(int,input().split())
A = list(map(int,input().split()))
S = sum(A)
cnt = 0
for a in A:
  if a >= S / (4*M):
    cnt += 1
if cnt >= M:
  print("Yes")
else:
	print("No")

Buggy submission (verdict: Runtime Error):
N, M = map(int,input().split())
2 A = list(map(int,input().split()))
3 S = sum(A)
4 cnt = 0
5 for a in A:
6 if a >= S / (4*M):
7 cnt += 1
8 if cnt >= M:
9 print("Yes")
10 else:
11 print("No")
Problem p02641 (python)

Fixed submission:
import bisect
X,N = map(int, input().split())


if N == 0:
    print(X)
    exit()


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

p.sort()
gen = list(range(-5,120))

for i in p:
    gen.remove(i)

index = bisect.bisect(gen,X)

ans = 100000
ans2 = 100000

a = [gen[index-1],gen[index],gen[index+1]]

for i in range(3):
    check = abs(a[i]-X)
    if ans > check:
        ans = check
        ans2 = a[i]
    
print(ans2)

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


if N == 0:
    print(X)
    exit()
    
p = list(map(int,input().split()))

p.sort()
gen = list(range(-1,101))

for i in p:
    gen.remove(i)

index = bisect.bisect(gen,X)

ans = 100000
ans2 = 100000
a = [gen[index-1],gen[index],gen[index+1]]

for i in range(3):
    if ans >= abs(a[i]-X):
        ans = abs(a[i]-X)
        ans2 = a[i]
    else:
        pass
print(ans2)
Problem p02646 (python)

Fixed submission:
a,v = map(int,input().split())
b,w = map(int,input().split())
t = int(input())
if (v-w)*t>=abs(b-a):
    print("YES")
else:
    print("NO")

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())
dis = abs(B-A)
mob = abs(V-W)


if V-W <= 0
    print("No")
else:
    if dis - T*mob <= 0:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
a, v=map(int, input().split())
b, w=map(int, input().split())
t=int(input())
 
dis =abs(a-b)
mob =v-w
 
if speed<=0:
    print("No")
else:
    if distance/speed <=t:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
a, v=map(int, input().split())
b, w=map(int, input().split())
t=int(input())
 
dis =abs(a-b)
mob =v-w
 
if speed<=0:
    print("No")
else:
    if distance/speed <=T:
        print("Yes")
    else:
        print("No")

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

if A+(V*T) >= B +(W*T):
    print("Yes"):
else:
    print("No")

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

dis = B-A
mob = W-V

if A == B:
    print("Yes")
else:
    if dis % mob != 0:
        print("No")
    else:
        if dis + (mob*T) <= 0:
            print("Yes")
        else:
            print("No")

Buggy submission (verdict: Runtime Error):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = int(input())

dis = B-A
mob = W-V

if A == B:
    print("Yes")
else:
    if dis % mob != 0:
            print("No")
    else:
            if dis + (mob*T) <= 0:
                print("Yes")
            else:
                print("No")