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

Fixed submission:
import sys

sys.setrecursionlimit(10000000)
N, M = [int(_) for _ in input().split()]

LRD = []
path = [[] for _ in range(N + 1)]
for _ in range(M):
    l, r, d = [int(_) for _ in input().split()]
    path[l].append((r, d))
    path[r].append((l, -d))
    LRD.append((l, r, d))

INF = -1e12
memo = [INF] * (N + 1)


def dfs(n):
    for ni, d in path[n]:
        if memo[ni] != INF: continue
        memo[ni] = memo[n] + d
        dfs(ni)


for i in range(1, N + 1):
    if memo[i] != INF: continue
    memo[i] = 0
    dfs(i)
for l, r, d in LRD:
    if memo[l] + d != memo[r] and memo[l] - d != memo[r]:
        print('No')
        exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
N, M = [int(_) for _ in input().split()]

LRD = []
path = [[] for _ in range(N + 1)]
for _ in range(M):
    l, r, d = [int(_) for _ in input().split()]
    path[l].append((r, d))
    path[r].append((l, -d))
    LRD.append((l, r, d))

INF = -1e12
memo = [INF] * (N + 1)


def dfs(n):
    for ni, d in path[n]:
        if memo[ni] != INF: continue
        memo[ni] = memo[n] + d
        dfs(ni)


for i in range(1, N + 1):
    if memo[i] != INF: continue
    memo[i] = 0
    dfs(i)
for l, r, d in LRD:
    if not memo[l] + d == r:
        print('No')
        exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
N, M = [int(_) for _ in input().split()]

LRD = []
path = [[] for _ in range(N + 1)]
for _ in range(M):
    l, r, d = [int(_) for _ in input().split()]
    path[l].append((r, d))
    path[r].append((l, -d))
    LRD.append((l, r, d))

memo = [None] * (N + 1)


def dfs(n):
    for ni, d in path[n]:
        if memo[ni] is not None: continue
        memo[ni] = memo[n] + d
        dfs(ni)


for i in range(N):
    if memo[i] is not None: continue
    memo[i] = 0
    dfs(i)
for l,r,d in LRD:
    if not memo[l] + d == memo[r]:

        print('No')
        exit()
print('Yes')
Problem p03479 (python)

Fixed submission:
import math

X, Y = [int(_) for _ in input().split()]
tmp = math.floor(math.log2(Y / X))
if (2 ** tmp) * X > Y:
    tmp -= 1
print(tmp + 1)

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

X, Y = [int(_) for _ in input().split()]
print(math.floor(math.log2(Y / X)) + 1)
Problem p03739 (python)

Fixed submission:
N = int(input())

A = [int(_) for _ in input().split()]


def f(sign):
    ans = 0
    s = 0
    for i in range(N):
        a = A[i]
        s += a
        if s == 0:
            ans += 1
            s = sign
        else:
            a_sign = s // abs(s)
            if a_sign != sign:
                ans += abs(s) + 1
                s = sign
        sign *= -1
    return ans


print(min(f(1), f(-1)))

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

A = [int(_) for _ in input().split()]
ans = 0
s = A[0]

i = 1
while i < N:
    a = A[i]
    # print(i, s, ans)

    sign = (s // abs(s))
    abs_min = abs(s) + 1
    if a == 0:
        ans += abs_min
        s = -sign

        i += 1
        continue

    abs_a = abs(a)
    a_sign = (a // abs_a)
    if a_sign == sign:
        A[i] = 0
        ans += abs_a
    else:
        if abs_min <= abs_a:
            s = (abs_a - abs(s)) * a_sign
        else:
            ans += abs_min - abs_a
            s = -sign
        i += 1
print(ans)
Problem p03837 (python)

Fixed submission:
N, M = [int(_) for _ in input().split()]
INF = 10 ** 10
costs = [[INF] * 101 for _ in range(101)]

for i in range(N + 1):
    costs[i][i] = 0
paths = []
for i in range(M):
    a, b, c = [int(_) for _ in input().split()]
    costs[a][b] = c
    costs[b][a] = c
    paths.append((a, b, c))

for k in range(N + 1):
    for i in range(N + 1):
        for j in range(N + 1):
            costs[i][j] = min(costs[i][j], costs[i][k] + costs[j][k])
            costs[j][i] = costs[i][j]

for i in range(1, N + 1):
    paths2 = paths.copy()
    for p in paths:
        # 点i から 経路p をつかってp[1]への経路をもつかチェック
        if costs[i][p[0]] >= INF or costs[i][p[1]] >= INF: continue
        if costs[i][p[0]] + p[2] == costs[i][p[1]]:
            paths2.remove(p)
    paths = paths2
print(len(paths))

Buggy submission (verdict: Runtime Error):
N, M = [int(_) for _ in input().split()]
INF = 10 ** 10
costs = [[INF] * 101 for _ in range(101)]

for i in range(N + 1):
    costs[i][i] = 0
paths = []
for i in range(M):
    a, b, c = [int(_) for _ in input().split()]
    costs[a][b] = c
    costs[b][a] = c
    paths.append((a, b, c))

for k in range(N + 1):
    for i in range(N + 1):
        for j in range(N + 1):
            costs[i][j] = min(costs[i][j], costs[i][k] + costs[j][k])
            costs[j][i] = costs[i][j]

for i in range(N):
    paths2 = paths.copy()
    for p in paths:
        # 点i から 経路p をつかってp[1]への経路をもつかチェック
        if costs[i][p[0]] + p[2] == costs[i][p[1]]:
            paths2.remove(p)
    paths = paths2
print(len(paths))
Problem p03860 (python)

Fixed submission:
a,b,c=[_ for _ in input().split()]
print('A'+b[0]+'C')

Buggy submission (verdict: Runtime Error):
a,b,c=[int(_) for _ in input().split()]
print('A'+b[0]+'C')
Problem p04013 (python)

Fixed submission:
N, A = [int(_) for _ in input().split()]

MAX_I = 5000
memo = [[0] * MAX_I for _ in range(N + 2)]


def cnv(v):
    return v - A + (MAX_I // 2)


X = [int(_) for _ in input().split()]
for i in range(N):
    offset = X[i] - A
    # print('x', offset)

    mm = memo[i]
    for j in range(MAX_I):
        if mm[j] > 0:
            memo[i + 1][j + offset] += mm[j]
        memo[i + 1][j] += mm[j]

    memo[i + 1][cnv(X[i])] += 1

print(memo[N][MAX_I//2])

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

MAX_I = 2000
memo = [[0] * MAX_I for _ in range(N + 2)]


def cnv(v):
    return v - A + (MAX_I // 2)


X = [int(_) for _ in input().split()]
for i in range(N):
    offset = X[i] - A
    # print('x', offset)

    mm = memo[i]
    for j in range(MAX_I):
        if mm[j] > 0:
            memo[i + 1][j + offset] += mm[j]
        memo[i + 1][j] += mm[j]

    memo[i + 1][cnv(X[i])] += 1

print(memo[N][MAX_I//2])

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

MAX_I = 1000
memo = [[0] * MAX_I for _ in range(N + 2)]


def cnv(v):
    return v - A + (MAX_I // 2)


X = [int(_) for _ in input().split()]
for i in range(N):
    offset = X[i] - A
    # print('x', offset)

    mm = memo[i]
    for j in range(MAX_I):
        if mm[j] > 0:
            memo[i + 1][j + offset] += mm[j]
        memo[i + 1][j] += mm[j]

    memo[i + 1][cnv(X[i])] += 1

print(memo[N][MAX_I//2])

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

MAX_I = 200
memo = [[0] * MAX_I for _ in range(N + 2)]


def cnv(v):
    return v - A + (MAX_I // 2)


X = [int(_) for _ in input().split()]
for i in range(N):
    offset = X[i] - A
    # print('x', offset)

    mm = memo[i]
    for j in range(MAX_I):
        if mm[j] > 0:
            # print('j+x', j + offset)
            memo[i + 1][j + offset] += mm[j]
        memo[i + 1][j] += mm[j]

    memo[i + 1][cnv(X[i])] += 1
    # print(memo[i + 1][90:110])

print(memo[i + 1][100])
Problem p02741 (python)

Fixed submission:
K=int(input())
li=[1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]
print(li[K-1])

Buggy submission (verdict: Runtime Error):
a,b,c=map(int,input().split())
if c-a-b>0:
  if 4*a*b<(c-a-b)**2:
  	print('Yes')
  else:
  	print('No')
else:
  print('No')
Problem p02767 (python)

Fixed submission:
N=int(input())
S=list(map(int,input().split()))
memo=[]
for i in range(min(S)-100,max(S)+100):
    summ = 0
    for j in range(0,N):#実際にsumを求める
        summ+=(i-S[j])**2
    memo.append(summ)

print(min(memo))

Buggy submission (verdict: Runtime Error):
N=int(input())
S=list(map(int,input().split()))
memo=[]
for i in range(min(S),max(S)):
    summ = 0
    for j in range(0,N):#実際にsumを求める
        summ+=(i-S[j])**2
    memo.append(summ)

print(min(memo))

Buggy submission (verdict: Runtime Error):
N=int(input())
S=list(map(int,input().split()))
memo=[]
for i in range(S[0],S[N-1]):
    summ = 0
    for j in range(0,N):#実際にsumを求める
        summ+=(i-S[j])**2
    memo.append(summ)

print(min(memo))

Buggy submission (verdict: Runtime Error):
N=int(input())
S=list(map(int,input().split()))
print(S)
memo=[]
for i in range(S[0],S[N-1]):
    summ = 0
    for j in range(0,N):#実際にsumを求める
        summ+=(i-S[j])**2
    memo.append(summ)

print(min(memo))
Problem p02774 (python)

Fixed submission:
import numpy as np
n, k = map(int, input().split())
a = np.array(list(map(int, input().split())))

a.sort()

plus = a[a > 0]
minus = a[a < 0]
zero = a[a == 0]

#infだと割ってもinf
left = -10 ** 18
right = 10 ** 18

while left + 1 < right:
    x = (left + right) // 2
    cnt = 0
    if x >= 0:
        cnt += n * len(zero)
    cnt += a.searchsorted(x // plus, side="right").sum()
    cnt += (n - a.searchsorted(-(-x // minus), side="left")).sum()
    cnt -= np.count_nonzero(a * a <= x)
    cnt //= 2

    if cnt >= k:
        right = x
    else:
        left = x

print(right)

Buggy submission (verdict: Runtime Error):
import numpy as np
n, k = map(int, input().split())
a = np.array(list(map(int, input().split())))

a.sort()

plus = a[a > 0]
minus = a[a < 0]
zero = a[a == 0]

#infだと割ってもinf
left = -10 ** 18
right = 10 ** 18

while left + 1 < right:
    x = (left + right) // 2
    cnt = 0
    if x >= 0:
        cnt += n * len(zero)
    cnt += a.searchsorted(x // plus, side="right").sum()
    cnt += (n - a.searchsorted(-(-x // minus), side="left")).sum()
    cnt -= np.count_nonzero(a * a <= x)
    cnt //= 2

    if cnt >= k:
        right = x
    else:
        left = x

print(right)
Problem p03043 (python)

Fixed submission:
import math
import sys
import numpy

N,K = map(int, input().split())
a = 0.000000000
b = 1
for i in range(1,N+1):
    b = 1
    if i >= K:
        a += 1/N
    else :
        tmp = i
        while tmp < K:
            tmp *= 2
            b /= 2
        a += b/N
print(a)

Buggy submission (verdict: Runtime Error):
import math
import sys
import numpy

N,K = int(input())
ans = 0.000000000
for i in range(1,N+1):
    if i >= K:
        ans += 1
    else :
        ans += math.log2(K/i)/2

ans /= N
print(ans)

Buggy submission (verdict: Runtime Error):
import math
import sys
import numpy

N,K = int(input())
ans = 0.000000000
for i in range(1,N+1):
    if i >= K:
        ans += 1
    else :
        ans += math.log(K/i,2)/2

ans /= N
print(ans)

Buggy submission (verdict: Runtime Error):
import math
import sys

N,K = int(input())
ans = 0.000000000
for i in range(1,N+1):
    tmp = i
    q = 1.0000000/N
    while(tmp < K):
        q /= 2.00000000
        tmp *= 2
print(ans*1.0000000000000000000)

Buggy submission (verdict: Runtime Error):
import math
import sys

N,K = int(input())
ans = 0.000000000
for i in range(1,N+1):
    tmp = i
    q = 1.0000000/N
    while(tmp < K):
        q /= 2.00000000
        tmp *= 2
print(ans*1.0000000000000000000)

Buggy submission (verdict: Runtime Error):
import math
import sys

N,K = int(input())
ans = 0.000000000
for i in range(1,N+1):
    tmp = i
    q = 1.0000000/N
    while(tmp < K):
        q /= 2.00000000
        tmp *= 2
print(ans*1.0000000000000000000)
Problem p03067 (python)

Fixed submission:
import math
import sys
a,b,c = map(int,input().split())
if a < c and c < b:
    print("Yes")
elif a > c and c > b:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import math
import sys
a,b,c = map(int(input().split()))
if a < c and c < b:
    print("Yes")
elif b < c and c < a:
    print("Yes")
else:
    print("No")

Buggy submission (verdict: Runtime Error):
import math
import sys
a,b,c = int(input().split())
if a < c and c < b:
    print("Yes")
elif b < c and c < a:
    print("Yes")
else:
    print("No")
Problem p03068 (python)

Fixed submission:
import math
import sys
N = int(input())
s = input()
k = int(input())
t = s[k-1]
u = ""
for i in s:
    if i == t:
        u += i
    else :
        u += '*'
print(u)

Buggy submission (verdict: Runtime Error):
import math
import sys
N = int(input())
s = input()
k = int(input())
t = s[k-1]
u = ""
for i in s:
    if s[i] == t:
        u += s[i]
    else :
        u += '*'
print(u)
Problem p03076 (python)

Fixed submission:
import math
import sys
import numpy

a = []
for _ in range(5):
    a.append(int(input()))

ans = 0
Q = []
for i in a:
    if i % 10 != 0:
        Q.append(10 - i%10)
    ans += i
Q.sort(reverse=True)
print(ans + sum(Q[1:]))

Buggy submission (verdict: Runtime Error):
import math
import sys
import numpy

a = list(mat(int,input().split()))
b = []
for i in range(5):
    b.append(a[i]%10)
mx = min(b)
ans = 0
for i in range(5):
    if mx == a[i]:
        continue
    else :
        ans += (a[i]+10-(a[i]%10))
ans += mx
print(ans)
Problem p03101 (python)

Fixed submission:
import numpy as np
H,W = map(int, input().split())
h,w = map(int, input().split())
print((H-h)*(W-w))

Buggy submission (verdict: Runtime Error):
H = int(input())
W = int(input())
h = int(input())
w = int(input())
print((H-h)*(W-w))

Buggy submission (verdict: Runtime Error):
H = int(input())
W = int(input())
h = int(input())
w = int(input())
tate = H-h
yoko = W-w
print(tate*yoko)

Buggy submission (verdict: Runtime Error):
H = input()
W = input()
h = input()
w = input()
tate = H-h
yoko = W-w
print(tate*yoko)
Problem p03102 (python)

Fixed submission:
n,m,c = map(int,input().split())
b = list(map(int,input().split()))
cnt = 0
for i in range(n):
    sum = 0
    a = list(map(int,input().split()))
    for j in range(m):
        sum += a[j]*b[j]
    if sum + c > 0:
        cnt += 1
print(cnt)

Buggy submission (verdict: Runtime Error):
n,m,c = map(int,input().split())
b = list(map(int,input().split()))
ans = 0
for i in range(n):
    a = list(map(int,input().split()))
    num = 0
    for j in range(m):
        num += a[j]*b[j]
    num += C
    if num > 0:
        ans += 1
print(ans)
Problem p03103 (python)

Fixed submission:
n,m = map(int,input().split())
ab = []
num = m
for i in range(n):
    a,b = map(int,input().split())
    ab.append([a,b])
ab.sort()
ans = 0
for i in ab:
    if i[1] >= num:
        ans += i[0]*num
        break
    else:
        ans += i[0]*i[1]
        num -= i[1]
print(ans)

Buggy submission (verdict: Runtime Error):
n,m = map(int,input().split())
ab = [0]
num = m
for i in range(n):
    a,b = map(int,input().split())
    ab.append([a,b])
ab.sort()
ans = 0
for i in ab:
    if i[1] >= num:
        ans += i[0]*num
        break
    else:
        ans += i[0]*i[1]
        num -= i[1]
print(ans)
Problem p03110 (python)

Fixed submission:
N = int(input())
mo = 0
for i in range(N):
    x,y = map(str,input().split())
    x = float(x)
    if y == 'JPY':
        mo += x
    else:
        tmp = x*380000
        mo += tmp
print(mo)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(N):
    x, u = map(str,input())
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += x*380000

print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
ans = 0
for i in range(N):
    x, u = str(int,input())
    x = float(x)
    if u == 'JPY':
        ans += x
    else:
        ans += x*380000

print(ans)
Problem p03126 (python)

Fixed submission:
n,m = map(int,input().split())
num = [list(map(int,input().split())) for i in range(n)]
l = [0]*m
for i in range(n):
    for j in num[i][1:]:
        l[j-1] += 1
print(l.count(n))

Buggy submission (verdict: Runtime Error):
n,m = map(int,input())
num = [list(map(int,input().split())) for i in range(n)]
l = [0]*m
for i in range(n):
    for j in num[i][1:]:
        l[j-1] += 1
print(l.count(n))
Problem p03210 (python)

Fixed submission:
x = int(input())
if x == 3 or x == 5 or x == 7:
    print("YES")
else :
    print("NO")

Buggy submission (verdict: Runtime Error):
x = int(input())
if x == 3 or x == 5 or x == 7:
    print("YES")
else print("NO")

Buggy submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    ll n; cin >> n;
    if(n == 3 || n == 5 || n== 7){
        cout << "YES" << endl;
    } else {
        cout << "NO" << endl;
    }
}
Problem p03211 (python)

Fixed submission:
s = str(input())
ans = 1000
for i in range(len(s)-2):
    x = int(s[i:i+3])
    ans = min(ans, abs(x-753))
print(ans)

Buggy submission (verdict: Runtime Error):
s = input()
ans = []
for i in range(len(s) - 2):
    ans.append(abs(s[i:i+3] - 753))
print(min(ans))

Buggy submission (verdict: Runtime Error):
s = input()
ans = []
for i in range(len(s) - 2):
    ans.append(abs(s[i:i+3]) - 753)
print(min(ans))

Buggy submission (verdict: Runtime Error):
s = str(input())
ans = []
for i in range(len(s) - 2):
    ans.append(abs(s[i:i+3]) - 753)
print(min(ans))

Buggy submission (verdict: Runtime Error):
#include<bits/stdc++.h>
using namespace std;
using ll = long long;

int main(){
    string s; cin >> s;
    int a, b;
    int ans = 1000;
    for(int i = 0; i < s.size() -2; i++){
        a = (s[i] - '0')*100 + (s[i+1] - '0')*10 + s[i+2];
        b = abs(a - 753);
        ans = min(b, ans);
    }
    cout << ans << endl;
}
Problem p03220 (python)

Fixed submission:
n = int(input())
t,a = map(int, input().split())
h = list(map(int,input().split()))
ans = -1
mn = 10**9
for i in range(n):
    x = abs(t - h[i]*0.006 - a)
    if x < mn:
        mn = x
        ans = i+1
print(ans)

Buggy submission (verdict: Runtime Error):
n = int(input())
t,a = map(int, input().split())
h = list(map(int,input().split()))
ans = 1000000
for i in n:
    x = t - h[i]*0.006
    ans = min(ans, abs(x-a))
print(ans)
Problem p03238 (python)

Fixed submission:
N = int(input())

if N == 1:
  print("Hello World")
  
elif N == 2:
  A = int(input())
  B = int(input())
  print(A + B)

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

if N == 1:
  print("Hello World")
  
elif N == 2:
  print(A + B)

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

if N == 1:
  print("Hello World")
  
elif N == 2:
  print(A + B)
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()))
x.append(X)
y.append(Y)
x.sort()
y.sort()
print('No War' if x[-1] < y[0] else '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()))
x.sort()
y.sort()
if x[n-1] < y[0] and X < y[0] and y < x[n-1]:
    print('No War')
else:
    print('War')

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
list1 = [int(input()) for i in range(N)]
list2 = [int(input()) for h in range(M)]

if X >= min(list1) or Y <= max(list2):
  print("War")
  
else:
  print("No War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
list_xi = [int(input()) for i in range(N)]
list_yi = [int(input()) for h in range(M)]

if X >= min(list_yi) or Y <= max(list_xi):
  print("War")
  
else:
  print("No War")

Buggy submission (verdict: Runtime Error):
N, M, X, Y = map(int, input().split())
list_xi = [int(input()) for i in range(N)]
list_yi = [int(input()) for h in range(M)]

if X >= min(list_yi) or Y <= max(list_xi):
  print("War")
  
else:
  print("No War")
Problem p03260 (python)

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

if (A == 2) or (B == 2):
  print("No")
  
else:
  print("Yes")

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

if (A == 2) or (B == 2):
  print("No")
  
else:
  print("Yes")

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

if A == 2 or B == 2:
  print("No")
  
else:
  print("Yes")

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

if A == 2 or B == 2:
  print("No")
  
else:
  print("Yes")

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

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C == 3:
  print("Yes")

Buggy submission (verdict: Runtime Error):
int i, t
A, B = int(input(i, t))
int C

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C == 3:
  print("Yes")

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

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Buggy submission (verdict: Runtime Error):
A, B = [int(i) for i in input().split()]
int C

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Buggy submission (verdict: Runtime Error):
int C
A, B = [int(i) for i in input().split()]

if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Buggy submission (verdict: Runtime Error):
int C
A = int(input())
B = int(input())
if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Buggy submission (verdict: Runtime Error):
int A, B, C
A = input()
B = input()
if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")

Buggy submission (verdict: Runtime Error):
int A, B, C
if A == 2 or B == 2:
  print("No")
  
elif C == 1 or C ==3:
  print("Yes")
Problem p03273 (python)

Fixed submission:
H,W = map(int,input().split())
A = []
B = []
for i in range(H):
    a = list(input())
    if a != ["."]*W:
        A.append(a)
for i in range(W):
    cnt = 0
    for j in range(len(A)):
        if A[j][i] != '.':
            cnt += 1
    if cnt == 0:
        B.insert(0,i)
for i in range(len(A)):
    for j in range(len(B)):
        del A[i][B[j]]
for i in range(len(A)):
    ans = "".join(A[i])
    print(ans)

Buggy submission (verdict: Runtime Error):
H,W = map(int,input().split())
tmp = True
A = []
B = []
for i in range(H):
    a = list(input())
    if a != ['.']*W:
        A.appned(a)
for i in range(W):
    cnt = 0
    for j in range(len(A)):
        if A[j][i] != '.':
            cnt += 1
    if cnt == 0:
        B.insert(0,i)
for i in range(len(A)):
    for j in range(len(B)):
        del A[i][B[j]]
for i in range(len(A)):
    ans = "".join(A[i])
    print(ans)
Problem p03293 (python)

Fixed submission:
import sys
S = list(input())
T = list(input())

for i in range(len(S)):
    if S == T:
        print("Yes")
        sys.exit(0)
    S = S[1:] + list(S[0])
print("No")

Buggy submission (verdict: Runtime Error):
import sys
S = list(input())
T = list(input())
for i in range(len(S)):
    if S == T:
        print("Yes")
        sys.exit(0)
    l = S[1:] + list(l[0])
print("No")
Problem p03324 (python)

Fixed submission:
d,N = map(int,input().split())
if N != 100:
    print((100**d)*N)
else:
    print((100**d)*101)

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

Fixed submission:
N = int(input())
s = map(str,input().split())
if 'Y' in s:
    print("Four")
else:
    print("Three")

Buggy submission (verdict: Runtime Error):
N = int(input())
s = map(str,input().split())
a = []
for i in range(N):
    a[s[i]] += 1
ans = 0
if a['P'] > 0:
    ans += 1
if a['W'] > 0:
    ans += 1
if a['G'] > 0:
    ans += 1
if a['Y'] > 0:
    ans += 1
if ans == 3:
    print("Three")
else :
    print("Four")
Problem p03078 (python)

Fixed submission:
x, y, z, k = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)
AB = [x + y for x in A for y in B]
AB.sort(reverse=True)
ABC = [x + y for x in AB[:min(len(AB), k)] for y in C[:min(len(C), k)]]
ABC.sort(reverse=True)
for i in range(k):
    print(ABC[i])

Buggy submission (verdict: Runtime Error):
x, y, z, k = map(int, input().split())
A = list(sorted(list(map(int, input().split())), reverse=True))
B = list(sorted(list(map(int, input().split())), reverse=True))
C = list(sorted(list(map(int, input().split())), reverse=True))
D = [A[a] + B[b] + C[c] for a in range(x) for b in range(y) for c in range(z) if a + b + c + 3 <= k]
D.sort(reverse=True)
for i in range(k):
    print(D[i])