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

Fixed submission:
from collections import deque

N, Q = map(int, input().split())
graph_lis = [[] for n in range(N)]

for i in range(N - 1):
    a, b = map(int, input().split())
    graph_lis[a - 1].append(b - 1)
    graph_lis[b - 1].append(a - 1)

ans = [0] * N
for q in range(Q):
    p, x = map(int, input().split())
    ans[p - 1] += x

deq = deque([0])
visited = [False] * N
while deq:
    parent = deq.popleft()
    edge = graph_lis[parent]
    for v in edge:
        if not visited[v]:
            ans[v] += ans[parent]
            deq.append(v)
    visited[parent] = True
print(*ans)

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

graph_lis = [[] for i in range(N)]
for n in range(N - 1):
    a, b = map(int, input().split())
    a, b = min(a, b), max(a, b)
    graph_lis[b - 1].append(a - 1)

ans_list = [0] * N

points = [0] * N
for q in range(Q):
    p, x = map(int, input().split())
    points[p - 1] += x

ans_list[0] = points[0]
for n in range(1, N):
    ans_list[n] = ans_list[graph_lis[n][0]] + points[n]
print(' '.join(map(str, ans_list)))

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

graph_lis = [[] for i in range(N)]
for n in range(N - 1):
    a, b = map(int, input().split())
    graph_lis[b - 1].append(a - 1)

ans_list = [0] * N

points = [0] * N
for q in range(Q):
    p, x = map(int, input().split())
    points[p - 1] += x

ans_list[0] = points[0]
for n in range(1, N):
    ans_list[n] = ans_list[graph_lis[n][0]] + points[n]
print(' '.join(map(str, ans_list)))

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

graph_lis = [[] for i in range(N)]
for n in range(N - 1):
    a, b = map(int, input().split())
    graph_lis[b - 1].append(a - 1)

ans_list = [0] * N

points = [0] * N
for q in range(Q):
    p, x = map(int, input().split())
    points[p - 1] += x

ans_list[0] = points[0]
for n in range(1, N):
    ans_list[n] = ans_list[graph_lis[n][0]] + points[n]
print(*ans_list)

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

graph_lis = [[] for i in range(N)]
for n in range(N - 1):#0-originedに注意
    a, b = map(int, input().split())
    graph_lis[b - 1].append(a - 1)

#print(graph_lis)

ans_list = [0] * N

points = [0] * N
for q in range(Q):
    p, x = map(int, input().split())
    # start from p - 1
    points[p - 1] += x

ans_list[0] = points[0]
for n in range(1, N):
    ans_list[n] = ans_list[graph_lis[n][0]] + points[n]
print(*ans_list)
Problem p02953 (python)

Fixed submission:
import sys
N = int(input())
A = [int(_) - 1 for _ in input().split()]

for n in range(1, N):
    if A[n] + 1 == A[n - 1]:
        A[n] += 1
    elif A[n] + 1 < A[n - 1]:
        print('No')
        sys.exit()
print('Yes')

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
H = [int(_) for _ in input().split()]

diff = [0] * (N - 1)
for n in range(N - 1):
    diff[n] = H[n] - H[n + 1]

for n in range(N - 1):
    if diff[n] >= 2:
        print('No')
        sys.exit()
    if diff[n] == 1 and diff[n + 1] == 1:
        print('No')
        sys.exit()

print('Yes')
Problem p02960 (python)

Fixed submission:
r = [[(j - k) * 9 % 13 for j in range(10)] for k in range(13)]
d = [1] + [0] * 12
M = 10 ** 9 + 7
for c in input():
    if c == '?':
        d = [sum(d[j] for j in k) % M for k in r]
    else:
        d = [d[(int(c) - k) * 9 % 13] for k in range(13)]
    #print(d)
print(d[5])

Buggy submission (verdict: Runtime Error):
r = [[(j - k) * 9 % 13 for j in range(10)] for k in range(13)]
d = [1] + [0] * 12

for c in input():
    if c == '?':
        d = [sum(d[j] for j in k) % M for k in r]
    else:
        d = [d[(int(c) - k) * 9 % 13] for k in range(13)]
    #print(d)
print(d[5])

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

dp = [[0 for i in range(n)] for j in range(13)]


if s[0] == '?':
    for i in range(10):
        dp[i][0] = 1

else:
    dp[s][0] = 1


mod_change_table = [(i * 10)%13 for i in range(13)]


for x in range(1, len(s)):
    for y in range(13):
        if s[x] == '?':
            for j in range(10):
                dp[(mod_change_table[y]+j)%13][x] += dp[y][x-1]
        else:
            dp[(mod_change_table[y]+int(s[x]))%13][x] += dp[y][x-1]


print(dp[5][n-1])

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

MOD = 10 ** 9 + 7
mod_change_table = [(i * 10) % 13 for i in range(13)]
dp = np.array([[0] * 13] * (len(S)))
if S[0] == '?':
    dp[0][:10] = 1
else:
    dp[0][int(S[0])] = 1

for i in range(1, len(S)):
    for j in range(13):
        if S[i] == '?':
            for k in range(10):
                dp[i][(mod_change_table[j] + k) % 13] += dp[i - 1][j]
        else:
            dp[i][(mod_change_table[j] + c) % 13] += dp[i - 1][j]
    dp[i] %= MOD
print(dp[len(S) - 1][5])
Problem p02975 (python)

Fixed submission:
from collections import Counter
import sys
from functools import reduce
N = int(input())
A = [int(_) for _ in input().split()]

if set(A) == {0}:
    print('Yes')
    sys.exit()

counter = Counter(A)

if len(counter) and len(set(counter.values())) == 1:
    if reduce(lambda x, y: x ^ y, counter.keys()) == 0:
        print('Yes')
        sys.exit()

if len(counter) == 2:  
    if 0 in counter.keys():
        if counter[0] == len(A) // 3:
            print('Yes')
            sys.exit()
print('No')

Buggy submission (verdict: Runtime Error):
import sys
N = int(input())
a_lis = [int(_) for _ in input().split()]

if set(b) == {0}:
    print('Yes')
    sys.exit()
else:
    if len(a_lis) % 3 == 0:
        print('Yes')
    else:
        print('No')
Problem p02985 (python)

Fixed submission:
import sys
sys.setrecursionlimit(10 ** 6)
N, K = map(int, input().split())

lis = [[] for i in range(N + 1)]

for n in range(N - 1):
    a, b = map(int, input().split())
    lis[a].append(b)
    lis[b].append(a)

MOD = 10 ** 9 + 7

def dfs(pos, from_, K, lis):
    if from_ == -1:
        to_multi = K - 1
    else:
        to_multi = K - 2
    if len(lis[pos]) > K:
        return 0

    ans = 1
    for item in lis[pos]:
        if item != from_:
            ans *= to_multi
            to_multi -= 1
            ans %= MOD
    for item in lis[pos]:
        if item != from_:
            ans *= dfs(item, pos, K, lis)
            ans %= MOD
    
    return ans

print(K * dfs(1, from_=-1, K=K, lis=lis) % MOD)

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

lis = [[] for i in range(N + 1)]

for n in range(N - 1):
    a, b = map(int, input().split())
    lis[a].append(b)
    lis[b].append(a)

MOD = 10 ** 9 + 7

def dfs(pos, from_, K, lis):
    if from_ == -1:
        to_multi = K - 1
    else:
        to_multi = K - 2
    if len(lis[pos]) > K:
        return 0

    ans = 1
    for item in lis[pos]:
        if item != from_:
            ans *= to_multi
            to_multi -= 1
            ans %= MOD
    for item in lis[pos]:
        if item != from_:
            ans *= dfs(item, pos, K, lis)
            ans %= MOD
    
    return ans

K * dfs(1, from_=-1, K=K, lis=lis)
Problem p02996 (python)

Fixed submission:
N = int(input())

a_b_lis = [0] * N

for i in range(N):
    a_b_lis[i] = list(map(int, input().split()))

count = 0
#print(a_b_lis)
a_b_lis = sorted(a_b_lis, key=lambda x: x[1])

on_time = True
for item in a_b_lis:
    count += item[0]
    if count > item[1]:
        on_time = False
if on_time:
    print('Yes')
else:
    print('No')

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

a_b_lis = [0] * N

for i in range(N):
    a_b_lis[i] = list(map(int, input().split()))

count = 0
a_b_lis = sorted(a_b_lis, key=lambda x: x[1], x[0])

on_time = True
for item in a_b_lis:
    if item[0] + count <= item[1]:
        count += item[0]
        on_time = True
    else:
        on_time = False

if on_time:
    print('Yes')
else:
    print('No')

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

a_b_lis = [0] * N

for i in range(N):
    a_b_lis[i] = list(map(int, input().split()))

count = 0
a_b_lis = sorted(a_b_lis, key=lambda x: x[1], X[0])

on_time = True
for item in a_b_lis:
    if item[0] + count <= item[1]:
        count += item[0]
        on_time = True
    else:
        on_time = False

if on_time:
    print('Yes')
else:
    print('No')
Problem p03001 (python)

Fixed submission:
from decimal import *
import sys
W, H, x, y = map(int, input().split())
num = 0
if 2 * x == W and 2 * y == H:
    num = 1

print(W * H / 2, num)

Buggy submission (verdict: Runtime Error):
import sys
W, H, x, y = map(int, input().split())

area = max(min((W - x) * H, x * H), min((H - y) * W, y * W))

num = 0

if (x, y) == (0, 0) or (x, y) == (W, H) or (x, y) == (W, 0) or (x, y) == (0, H):
    print((W * H) / 2, str(0))
    sys.exit()

if (y == (W / H) * x or y == H - (H / W) * x) and (x, y) != (W / 2, H / 2):
    print(W * H / 2, str(0))
    sys.exit()

if (x, y) == (W / 2, H / 2):
  	print(W * H / 2, str(1))
    sys.exit()


if min((W - x) * H, x * H) == min((H - y) * W, y * W):
    num = 1
else:
    num = 0

print(area, str(num))

Buggy submission (verdict: Runtime Error):
import sys
W, H, x, y = map(int, input().split())

area = max(min((W - x) * H, x * H), min((H - y) * W, y * W))

num = 0

if (x, y) == (0, 0) or (x, y) == (W, H) or (x, y) == (W, 0) or (x, y) == (0, H):
    print((W * H) / 2, 0)
    sys.exit()

#直線上も加えよう
if abs(W / x) == abs(H / y) or y == H - (H / W) * x:
    print(W * H / 2, 0)
    sys.exit()
    


if min((W - x) * H, x * H) == min((H - y) * W, y * W):
    num = 1
else:
    num = 0

print(area, num)
Problem p03006 (python)

Fixed submission:
from itertools import combinations
import sys

N = int(input()) 
X_Y = [0] * N

for i in range(N):
    X_Y[i] = tuple(map(int, input().split()))


if N == 1:
    print(1)
    sys.exit()

combo = list(combinations(X_Y, 2))
diff = [0] * (len(combo))

dict_diff = {}

for i, item in enumerate(combo):
    x_dif = item[0][0] - item[1][0]
    y_dif = item[0][1] - item[1][1]
    diff[i] = [x_dif, y_dif]
    if str(diff[i]) in dict_diff:
        dict_diff[str(diff[i])] += 1
    else:
        dict_diff[str(diff[i])] = 1
    
    x_dif = item[1][0] - item[0][0]
    y_dif = item[1][1] - item[0][1]
    diff[i] = [x_dif, y_dif]
    if str(diff[i]) in dict_diff:
        dict_diff[str(diff[i])] += 1
    else:
        dict_diff[str(diff[i])] = 1

print((N) - max(dict_diff.values()))

Buggy submission (verdict: Runtime Error):
from itertools import combinations
import sys

if N == 1:
    print(1)
    sys.exit()

X_Y = [0] * N

for i in range(N):
    X_Y[i] = tuple(map(int, input().split()))

N = int(input())    

combo = list(combinations(X_Y, 2))
diff = [0] * (len(combo))

for i, item in enumerate(combo):
    x_dif = item[0][0] - item[1][0]
    y_dif = item[0][1] - item[1][1]
    diff[i] = [x_dif, y_dif]

count_list = [0] * len(diff)
for k, d in enumerate(diff):
    p = d[0]
    q = d[1]
    count = 0
    for i in range(0, len(X_Y) - 1):
        if (X_Y[i][0] == X_Y[i + 1][0] + p) and X_Y[i][1] == X_Y[i + 1][1] + q:
            count += 0
        else:
            count += 1
    count_list[k] = count
print(min(count_list) + 1)

Buggy submission (verdict: Runtime Error):
from itertools import combinations
N = int(input())

X_Y = [0] * N

for i in range(N):
    X_Y[i] = tuple(map(int, input().split()))
    
combo = list(combinations(X_Y, 2))
diff = [0] * (len(combo))

for i, item in enumerate(combo):
    x_dif = item[0][0] - item[1][0]
    y_dif = item[0][1] - item[1][1]
    diff[i] = [x_dif, y_dif]

count_list = [0] * len(diff)
for k, d in enumerate(diff):
    p = d[0]
    q = d[1]
    count = 0
    for i in range(0, len(X_Y) - 1):
        if (X_Y[i][0] == X_Y[i + 1][0] + p) and X_Y[i][1] == X_Y[i + 1][1] + q:
            count += 0
        else:
            count += 1
    count_list[k] = count
print(min(count_list) + 1)

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

X_Y = [0] * N

for i in range(N):
    X_Y[i] = tuple(map(int, input().split()))
    
combo = list(combinations(X_Y, 2))
diff = [0] * (len(combo))

for i, item in enumerate(combo):
    x_dif = item[0][0] - item[1][0]
    y_dif = item[0][1] - item[1][1]
    diff[i] = [x_dif, y_dif]

count_list = [0] * len(diff)
for k, d in enumerate(diff):
    p = d[0]
    q = d[1]
    count = 0
    for i in range(0, len(X_Y) - 1):
        if (X_Y[i][0] == X_Y[i + 1][0] + p) and X_Y[i][1] == X_Y[i + 1][1] + q:
            count += 0
        else:
            count += 1
    count_list[k] = count
print(min(count_list) + 1)
Problem p03007 (python)

Fixed submission:
N = int(input())

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

A_sorted = sorted(A_list)

pos_count = len([a for a in A_sorted if a >= 0])
neg_count = len([a for a in A_sorted if a < 0])

if pos_count == 0:
    pos_count = 1
    neg_count = N - 1
if neg_count == 0:
    pos_count = N - 1
    neg_count = 1

output_list = [0] * (N - 1)
count = 0
for q in range(neg_count, N - 1):
    output_list[count] = [A_sorted[0], A_sorted[q]]
    count += 1
    A_sorted[0] -= A_sorted[q]


for i in range(neg_count):
    output_list[count] = [A_sorted[N - 1], A_sorted[i]]
    count += 1
    A_sorted[N - 1] -= A_sorted[i]

print(A_sorted[N - 1])
for item in output_list:
    print(item[0], item[1])

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

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

A_sorted = sorted(A_list)

pos_count = len([a for a in A_sorted if a >= 0])
neg_count = len([a for a in A_sorted if a < 0])

output_list = [0] * (N - 1)
count = 0
for q in range(neg_count, N - 1):
    output_list[count] = [A_sorted[0], A_sorted[q]]
    count += 1
    A_sorted[0] -= A_sorted[q]


for i in range(neg_count):
    output_list[count] = [A_sorted[N - 1], A_sorted[i]]
    count += 1
    A_sorted[N - 1] -= A_sorted[i]

print(A_sorted[N - 1])
for item in output_list:
    print(item[0], item[1])
Problem p03014 (python)

Fixed submission:
import numpy as np

H, W = map(int, input().split())
S = np.array([list(input()) for _ in range(H)]) == '.'

D = np.zeros((H, W), dtype=int)
U = np.zeros((H, W), dtype=int)
L = np.zeros((H, W), dtype=int)
R = np.zeros((H, W), dtype=int)

for h in range(H):
    U[h] = (U[h - 1] + 1) * S[h]
    D[-h - 1] = (D[-h] + 1) * S[-h - 1]
for w in range(W):
    L[:, w] = (L[:, w - 1] + 1) * S[:, w]
    R[:, -w - 1] = (R[:, -w] + 1) * S[:, -w - 1]
print(np.max(U + D + L + R) - 3)

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

H, W = map(int, input().split())
S = np.array([list(input() for _ in range(H))]) == '.'

D = np.zeros((H, W), dtype=int)
U = np.zeros((H, W), dtype=int)
L = np.zeros((H, W), dtype=int)
R = np.zeros((H, W), dtype=int)

for h in range(H):
    U[h] = (U[h - 1] + 1) * S[h]
    D[-h - 1] = (D[-h] + 1) * S[-h - 1]
for w in range(W):
    L[:, w] = (L[:, w - 1] + 1) * S[:, w]
    R[:, -w - 1] = (R[:, -w] + 1) * S[: -w - 1]#print(L)
print(np.max(U + D + L + R) - 3)
Problem p03024 (python)

Fixed submission:
S = str(input())

circles = 0
crosses = 0

length = len(S)
rest = 15 - length


for i in S:
    if i == 'o':
        circles += 1
    else:
        crosses += 1

if rest + circles >= 8:
    print('YES')
else:
    print('NO')

Buggy submission (verdict: Runtime Error):
    print('YES')

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

circles = 0
crosses = 0

for i in S:
    if S = 'o':
        circles += 1
    else:
        crosses += 1
if circles >= 8:
    print('YES')
else:
    print('NO')
Problem p03029 (python)

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

apple_slices = A * 3 + P

print(apple_slices // 2)

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

N = int(input())
S = [0] * N
P = [0] * N

city_point = {}

for i in range(N):
    inp = input().split()
    S[i] = inp[0]
    P[i] = inp[1]
    city_point[i] = {'city': S[i], 'point': int(P[i])}
    
sorted_list = sorted(city_point.items(), key=lambda x: (x[1]['city'], x[1]['point']))

for item in sorted_list:
    print(item[0] + 1)
Problem p03030 (python)

Fixed submission:
N = int(input())

cookbook = [0] * N

for n in range(N):
    line = input().split()
    s = line[0]
    p = int(line[1])
    cookbook[n] = (n + 1, s, p)

l = sorted(cookbook, key = lambda x: (x[1], -x[2]))
for item in l:
    print(item[0])

Buggy submission (verdict: Runtime Error):
from collections import defaultdict

N = int(input())
S = [0] * N
P = [0] * N

city_point = {}

for i in range(N):
    inp = input().split()
    S[i] = inp[0]
    P[i] = inp[1]
    city_point[i] = {'city': S[i], 'point': int(P[i])}
    
sorted_list = sorted(city_point.items(), key=lambda x: (x[1]['city'], x[1]['point']))

for key in sorted_list:
    print(key + 1)
Problem p03035 (python)

Fixed submission:
import sys
A, B = map(int, input().split(' '))
if A >= 13:
    print(B)
elif A <= 12 and A >= 6:
    print(int(B / 2))
else:
    print(0)

Buggy submission (verdict: Runtime Error):
N, M = map(int, input().split())
L = [0] * M
R = [0] * M
for i in range(M):
    L[i], R[i] = map(int, input().split())

all_lists = [list(range(L[i], R[i] + 1)) for i in range(M)]

new_set = set(all_lists[0])
for i in range(len(all_lists) - 1):
    if len(new_set) == 0:
        break
    new_set = new_set & set(all_lists[i + 1])

print(len(new_set))
Problem p03047 (python)

Fixed submission:
def combinations(N, K):
    N = int(N)
    K = int(K)
    if N == K:
        return 1
    else:
        return N - K + 1
    
N, K = input().split(' ')

print(combinations(N, K))

Buggy submission (verdict: Runtime Error):
def combinations(R, G, B, N):
    R, G, B, N = int(R), int(G), int(B), int(N)
    sorted_tuple = sorted((R, G, B), reverse=True)
    R = sorted_tuple[0]
    G = sorted_tuple[1]
    B = sorted_tuple[2]
    number_combos = 0
    print(R)
    print(G)
    print(B)
    for x in range(N + 1):
        N_modified_x = N - R * x
        for y in range(N_modified_x + 1):
            N_modified_y = N_modified_x - G * y
            for z in range(N_modified_y + 1):
                if B * z == N_modified_y:
                    number_combos += 1
    return number_combos

R, G, B, N = input().split(' ')
print(combinations(R, G, B, N))

Buggy submission (verdict: Runtime Error):
%%time
def combinations(R, G, B, N):
    R, G, B, N = int(R), int(G), int(B), int(N)
    sorted_tuple = sorted((R, G, B), reverse=True)
    R = sorted_tuple[0]
    G = sorted_tuple[1]
    B = sorted_tuple[2]
    number_combos = 0
    
    for x in range(N + 1):
        N_modified_x = N - R * x
        for y in range(N_modified_x + 1):
            N_modified_y = N_modified_x - G * y
            for z in range(N_modified_y + 1):
                if B * z == N_modified_y:
                    number_combos += 1
    return number_combos

R, G, B, N = input().split(' ')
print(combinations(R, G, B, N))

Buggy submission (verdict: Runtime Error):
def combinations(N, K):
    N = int(N)
    K = int(K)
    elif N == K:
        return 1
    else:
        return N - K + 1
    
N, K = input().split(' ')

print(combinations(N, K))

Buggy submission (verdict: Runtime Error):
def combinations(N, K):
    N = int(N)
    K = int(K)
    k_ex = K
    n_ex = N
    n_k_ex = N - K
    for i in range(1, K):
        k_ex *= i
    for i in range(1, N):
        n_ex *= i
    for i in range(1, N - K):
        n_k_ex *= i
    return int(n_ex / (k_ex * n_k_ex))
N, K = input().split(' ')

print(combinations(N, K))

Buggy submission (verdict: Runtime Error):
def combinations(N, K):
    N = int(N)
    K = int(K)
    k_ex = K
    n_ex = N
    n_k_ex = N - K
    for i in range(1, K + 1):
        k_ex *= i
    for i in range(1, N + 1):
        n_ex *= i
    for i in range(1, N - K + 1):
        n_k_ex *= i
    return int(n_ex / (k_ex * n_k_ex))
N, K = input().split(' ')

print(combinations(N, K))
Problem p03048 (python)

Fixed submission:
def combinations(R, G, B, N):
    R, G, B, N = int(R), int(G), int(B), int(N)
    sorted_tuple = sorted((R, G, B), reverse=True)
    R = sorted_tuple[0]
    G = sorted_tuple[1]
    B = sorted_tuple[2]
    number_combos = 0

    for x in range(N // R + 1):
        for y in range((N - R * x) // G + 1):
            if (N - R * x - G * y) % B == 0:
                number_combos += 1
        
    return number_combos

R, G, B, N = input().split(' ')
print(combinations(R, G, B, N))

Buggy submission (verdict: Runtime Error):
%%time
def combinations(R, G, B, N):
    R, G, B, N = int(R), int(G), int(B), int(N)
    sorted_tuple = sorted((R, G, B), reverse=True)
    R = sorted_tuple[0]
    G = sorted_tuple[1]
    B = sorted_tuple[2]
    number_combos = 0
    print(R)
    print(G)
    print(B)
    for x in range(N + 1):
        N_modified_x = N - R * x
        for y in range(N_modified_x + 1):
            N_modified_y = (N_modified_x - G * y) // B
            for z in range(N_modified_y + 1):
                if z == N_modified_y:
                    number_combos += 1
    return number_combos

R, G, B, N = input().split(' ')
print(combinations(R, G, B, N))

Buggy submission (verdict: Runtime Error):
%%time
def combinations(R, G, B, N):
    R, G, B, N = int(R), int(G), int(B), int(N)
    sorted_tuple = sorted((R, G, B), reverse=True)
    R = sorted_tuple[0]
    G = sorted_tuple[1]
    B = sorted_tuple[2]
    number_combos = 0
    
    for x in range(N + 1):
        N_modified_x = N - R * x
        for y in range(N_modified_x + 1):
            N_modified_y = N_modified_x - G * y
            for z in range(N_modified_y + 1):
                if B * z == N_modified_y:
                    number_combos += 1
    return number_combos

print(combinations(13, 1, 4, 3000))
Problem p03067 (python)

Fixed submission:
a, b, c = input().split()
if (int(a) < int(c) and int(c) < int(b)) or (int(b) < int(c) and int(c) < int(a)):
  print('Yes')
else:
  print('No')

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
if a < b and b < c:
  print 'No'
elif a < c and c < b:
  print 'Yes'
elif b < c and c < a:
  print 'Yes'
elif b < a and a < c:
  print 'No'
elif c < a and a < b:
  print 'Yes'
elif c < b and b < a:
  print 'No'

Buggy submission (verdict: Runtime Error):
a = input()
b = input()
c = input()
if a < b and b < c:
  print 'No'
elif a < c and c < b:
  print 'Yes'
elif b < c and c < a:
  print 'Yes'
elif b < a and a < c:
  print 'No'
elif c < a and a < b:
  print 'Yes'
elif c < b and b < a:
  print 'No'

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
if a < b and b < c:
  print 'No'
elif a < c and c < b:
  print 'Yes'
elif b < c and c < a:
  print 'Yes'
elif b < a and a < c:
  print 'No'
elif c < a and a < b:
  print 'Yes'
elif c < b and b < a:
  print 'No'

Buggy submission (verdict: Runtime Error):
a, b, c = input().split()
if a < b and b < c:
  print 'No'

if a < c and c < b:
  print 'Yes'

if b < c and c < a:
  print 'Yes'

if b < a and a < c:
  print 'No'
  
if c < a and a < b:
  print 'Yes'
  
if c < b and b < a:
  print 'No'

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

if a < b and b < c:
  print 'No'

if a < c and c < b:
  print 'Yes'

if b < c and c < a:
  print 'Yes'

if b < a and a < c:
  print('No')
  
if c < a and a < b:
  print('Yes')
  
if c < b and b < a:
  print('No')

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

if a < b and b < c:
  print 'No'

if a < c and c < b:
  print('Yes')

if b < c and c < a:
  print('Yes')

if b < a and a < c:
  print('No')
  
if c < a and a < b:
  print('Yes')
  
if c < b and b < a:
  print('No')

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

if a < b and b < c:
  return 'No'

if a < c and c < b:
  print('Yes')

if b < c and c < a:
  print('Yes')

if b < a and a < c:
  print('No')
  
if c < a and a < b:
  print('Yes')
  
if c < b and b < a:
  print('No')

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

if a < b and b < c:
  print('No')

if a < c and c < b:
  print('Yes')

if b < c and c < a:
  print('Yes')

if b < a and a < c:
  print('No')
  
if c < a and a < b:
  print('Yes')
  
if c < b and b < a:
  print(No)

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

if a < b and b < c:
  print('No')

if a < c and c < b:
  print('Yes')

if b < c and c < a:
  print('Yes')

if b < a and a < c:
  print('No')
  
if c < a and a < b:
  print('Yes')
  
if c < b and b < a:
  print(No)