Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
from collections import defaultdict, Counter, namedtuple, deque
from bisect import bisect_left
from functools import reduce
import math

NN = 2020202
MOD = 10**9+7
INF = float("inf")


class BIT():
    def __init__(self, n):
        self.n = n
        self.bit = []
        for i in range(self.n+1):
            self.bit.append(defaultdict(int))
        self.s = ["*"]*self.n

    def _sum(self, i):
        s = defaultdict(int)
        while i > 0:
            for k, v in self.bit[i].items():
                s[k] += v
            i -= i & -i
        return s

    def add(self, i, val):
        old = self.s[i-1]
        self.s[i - 1] = val
        # print(old, val)
        if old == val:
            return

        while i <= self.n:
            # print(i)
            self.bit[i][val] += 1
            self.bit[i][old] -= 1
            if self.bit[i][old] <= 0:
                del self.bit[i][old]

            i += i & -i

    def get_sum(self, l, r):
        A = self._sum(r)
        B = self._sum(l-1)
        # print(A, B)
        for k,v in B.items():
            A[k] -= v
            if A[k] <= 0:
                del A[k]

        return len(A)
        # return self._sum(r) - self._sum(l)


N = int(input())
S = input()
Q = int(input())
query = [list(input().split()) for i in range(Q)]

tree = BIT(N)
for i in range(N):
    tree.add(i+1, S[i])
# print(tree.bit)

for i in range(Q):
    if query[i][0] == "1":
        tree.add(int(query[i][1]), query[i][2])
        # print(tree.bit)
    if query[i][0] == "2":
        print(tree.get_sum(int(query[i][1]), int(query[i][2])))


Fixed submission:
NN = 2020202
MOD = 10**9+7
INF = float("inf")


class BIT():
    def __init__(self, n):
        self.n = n
        self.bit = [[0]*26 for _ in range(self.n+1)]
        self.s = ["*"]*self.n

    def _sum(self, i):
        s = [0]*26
        while i > 0:
            for idx, v in enumerate(self.bit[i]):
                s[idx] += v
            i -= i & -i
        return s

    def add(self, i, val):
        """i番目にvalを加える"""
        old = self.s[i-1]
        self.s[i - 1] = val
        # print(old, val)
        if old == val:
            return

        while i <= self.n:
            # print(i)
            self.bit[i][ord(val) - ord("a")] += 1
            if 0 <= ord(old) - ord("a") < 26:
                self.bit[i][ord(old) - ord("a")] -= 1

            i += i & -i

    def get_sum(self, l, r):
        """区間[l, r)の和を求める"""
        A = self._sum(r)
        B = self._sum(l-1)
        # print(A, B)
        ans = 0
        for idx in range(26):
            if A[idx] > B[idx]:
                ans += 1

        return ans
        # return self._sum(r) - self._sum(l)


N = int(input())
S = input()
Q = int(input())
query = [list(input().split()) for i in range(Q)]

tree = BIT(N)
for i in range(N):
    tree.add(i+1, S[i])
# print(tree.bit)

for i in range(Q):
    if query[i][0] == "1":
        tree.add(int(query[i][1]), query[i][2])
        # print(tree.bit)
    if query[i][0] == "2":
        print(tree.get_sum(int(query[i][1]), int(query[i][2])))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
# print(N)
kyaku = 0
mise = 0

while N:
    # print(N, kyaku, mise)
    c = N%10
    if c == 5 and N%100-c >= 50:
        mise += 10 - c
        N += 10
    elif c <= 5:
        kyaku += c
    else:
        mise += 10-c
        N += 10
    N = N//10

print(kyaku+mise)

Fixed submission:
NN = 2020202
MOD = 10**9+7
INF = float("inf")

A = input()
N = [0]*len(A)
for i in range(len(A)):
    N[i] = int(A[i])
N = N[::-1]
N.append(0)
kyaku = 0
mise = 0

for i in range(len(N)-1):
    # print(N, kyaku, mise)
    if N[i] == 5 and N[i+1] >= 5:
        mise += 10 - N[i]
        N[i+1] += 1
    elif N[i] <= 5:
        kyaku += N[i]
    else:
        mise += 10-N[i]
        N[i + 1] += 1

if N[-1] == 1:
    kyaku += 1

print(kyaku+mise)
Buggy python submission (verdict: Time Limit Exceeded):
MOD = 1000000007
INF = float("inf")

h, n = map(int, input().split())

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

dp = [[INF for i in range(h + 1)] for j in range(n + 1)]

# for i in range(h + 1):
#     dp[0][i] = 0
#
for i in range(1, n + 1):
    dp[i][0] = 0

for i in range(1, n + 1):  # 1<= i <= N
    for j in range(1, h + 1):  # 1 <= j <= W
        if j - items[i - 1][0] >= 0:
            dp[i][j] = min(dp[i - 1][j], dp[i - 1][j - items[i - 1][0]] + items[i - 1][1],
                           dp[i][j - items[i - 1][0]] + items[i - 1][1])
        else:
            dp[i][j] = min(dp[i - 1][j], items[i - 1][1])

# print(dp)
print(dp[n][h])

Fixed submission:
MOD = 1000000007
INF = float("inf")

h, n = map(int, input().split())

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

dp = [[INF for i in range(h + 1)] for j in range(n + 1)]

# for i in range(h + 1):
#     dp[0][i] = 0
#
for i in range(1, n + 1):
    dp[i][0] = 0

for i in range(1, n + 1):  # 1<= i <= N
    for j in range(1, h + 1):  # 1 <= j <= W
        if j - items[i - 1][0] >= 0:
            dp[i][j] = min(dp[i - 1][j], dp[i - 1][j - items[i - 1][0]] + items[i - 1][1],
                           dp[i][j - items[i - 1][0]] + items[i - 1][1])
        else:
            dp[i][j] = min(dp[i - 1][j], items[i - 1][1])

# print(dp)
print(dp[n][h])
Buggy python submission (verdict: Time Limit Exceeded):
import fractions

MOD = 1000000007

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

lcm = A[0]
for i in range(1, N):
    # lcm = lcm//math.gcd(lcm, A[i]) * A[i]
    lcm = lcm//fractions.gcd(lcm, A[i]) * A[i]
# print(lcm)

ans = 0
for i in range(N):
    ans = (ans + lcm//A[i]) % MOD
print(ans)

Fixed submission:
from collections import defaultdict, Counter
import math
import fractions

MOD = 1000000007

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

mod = 1000000007


def extgcd(a,b):
    r = [1,0,a]
    w = [0,1,b]
    while w[2]!=1:
        q = r[2]//w[2]
        r2 = w
        w2 = [r[0]-q*w[0],r[1]-q*w[1],r[2]-q*w[2]]
        r = r2
        w = w2
    return [w[0],w[1]]


def mod_inv(a):
    x = extgcd(a,MOD)[0]
    return (MOD+x%MOD)%MOD


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


all = Counter()
for i in range(N):
    li = prime_factorize(A[i])
    tmp = Counter(li)
    for k, v in tmp.items():
        if all[k] < v:
            all[k] = v

# print(all)
lsm = 1
for k, v in all.items():
    lsm = lsm*(k**v)%MOD
# print(lsm)

ans = 0
for i in range(N):
    ans = (ans + lsm * mod_inv(A[i])) % MOD

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import fractions

MOD = 1000000007

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

lcm = A[0]
for i in range(1, N):
    # lcm = lcm//math.gcd(lcm, A[i]) * A[i]
    lcm = lcm//fractions.gcd(lcm, A[i]) * A[i]
# print(lcm)

ans = 0
for i in range(N):
    ans = (ans + lcm//A[i]) % MOD
print(ans)

Fixed submission:
from collections import defaultdict, Counter
import math
import fractions

MOD = 1000000007

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

mod = 1000000007


def extgcd(a,b):
    r = [1,0,a]
    w = [0,1,b]
    while w[2]!=1:
        q = r[2]//w[2]
        r2 = w
        w2 = [r[0]-q*w[0],r[1]-q*w[1],r[2]-q*w[2]]
        r = r2
        w = w2
    return [w[0],w[1]]


def mod_inv(a):
    x = extgcd(a,MOD)[0]
    return (MOD+x%MOD)%MOD


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


all = Counter()
for i in range(N):
    li = prime_factorize(A[i])
    tmp = Counter(li)
    for k, v in tmp.items():
        if all[k] < v:
            all[k] = v

# print(all)
lsm = 1
for k, v in all.items():
    lsm = lsm*(k**v)%MOD
# print(lsm)

ans = 0
for i in range(N):
    ans = (ans + lsm * mod_inv(A[i])) % MOD

print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
from typing import NamedTuple
from fractions import gcd

NN = 202020
MOD = 10**9+7
INF = float("inf")

n, u, v = map(int, input().split())
Edge = [list(map(int, input().split())) for _ in range(n-1)]
u -= 1
v -= 1
graph = [[] for _ in range(n)]
for a, b in Edge:
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)

def bfs(start, player):
    que = deque([(start, -1, 0)])
    while que:
        node, par, dst = que.popleft()
        # print(node, par, dst)
        if len(graph[node]) == 1:
            # print(player, node)
            dst_dict[player][node] = dst

        for nxt in graph[node]:
            if nxt == par:
                continue
            que.append((nxt, node, dst+1))


dst_dict = [{}, {}]
bfs(u, 0)
bfs(v, 1)
# print(dst_dict[0], dst_dict[1])

max_time = 0
for k in dst_dict[0]:
    if dst_dict[0][k] < dst_dict[1][k]:
        max_time = max(max_time, dst_dict[1][k]-1)

print(max_time)



Fixed submission:
from collections import defaultdict, Counter, namedtuple, deque

NN = 202020
MOD = 10**9+7
INF = float("inf")

n, u, v = map(int, input().split())
Edge = [list(map(int, input().split())) for _ in range(n-1)]
u -= 1
v -= 1
graph = [[] for _ in range(n)]
for a, b in Edge:
    graph[a-1].append(b-1)
    graph[b-1].append(a-1)


def bfs(start, player):
    que = deque([(start, -1, 0)])
    while que:
        node, par, dst = que.popleft()
        # print(node, par, dst)
        if len(graph[node]) == 1:
            # print(player, node)
            dst_dict[player][node] = dst

        for nxt in graph[node]:
            if nxt == par:
                continue
            que.append((nxt, node, dst+1))


dst_dict = [{}, {}]
bfs(u, 0)
bfs(v, 1)
# print(dst_dict[0], dst_dict[1])

max_time = 0
for k in dst_dict[0]:
    if dst_dict[0][k] < dst_dict[1][k]:
        max_time = max(max_time, dst_dict[1][k]-1)

print(max_time)
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
n += 1
s = input()
dst = [float("inf")]*n
dst[-1] = 0

for i in reversed(range(n-1)):
    if s[i] == "1":
        continue
    for j in range(min(n-1-i, m)):
        # print(i, j)
        if s[i+j+1] == "0":
            dst[i] = min(dst[i], dst[i+j+1]+1)

# print(dst)
if dst[0] == float("inf"):
    print(-1)
else:
    last_idx = 0
    last_num = dst[0]
    ans = []
    for i in range(1, n):
        if dst[i] != float("inf") and dst[i] != last_num:
            ans.append(i - last_idx)
            last_num = dst[i]
            last_idx = i

    print(*ans)



Fixed submission:
n, m = map(int, input().split())
n += 1
s = input()
dst = [float("inf")]*n
dst[-1] = 0
m_last = n-1

for i in reversed(range(n-1)):
    if s[i] == "1":
        continue
    for j in reversed(range(min(m_last+1, i+m+1))):
        # print(i, j)
        if s[j] == "0":
            dst[i] = dst[j]+1
            m_last = j
            break

    if dst[i] == float("inf"):
        print(-1)
        exit()

# print(dst)
last_idx = 0
last_num = dst[0]
ans = []
for i in range(1, n):
    if dst[i] != float("inf") and dst[i] != last_num:
        ans.append(i - last_idx)
        last_num = dst[i]
        last_idx = i

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

if 1<=a<=9 and 1<=b<=9:
  return a*b
else:
  return -1

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

if 1<=a<=9 and 1<=b<=9:
  print(a*b)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
from collections import Counter
n = int(input())
coor = []
for i in range(n):
  x,y = map(int, input().split())
  coor.append([x,y])

dif = []
for i in range(n):
  for j in range(n):
    if i != j:
      dif.append((coor[i][0] - coor[j][0], coor[i][1] - coor[j][1]))
      
S = Counter(dif)
way = max(S.values())
print(n-way)

Fixed submission:
from collections import Counter
n = int(input())
coor = []
for i in range(n):
  x,y = map(int, input().split())
  coor.append([x,y])
  
if n == 1:
  print(1)
  exit()

dif = []
for i in range(n):
  for j in range(n):
    if i != j:
      dif.append((coor[i][0] - coor[j][0], coor[i][1] - coor[j][1]))
      
S = Counter(dif)
way = max(S.values())
print(n-way)
Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
A = list(map(int, input().split()))
left = [0]*N
right = [0]*N

left_gcd = A[0]
left[0] = A[0]
for i in range(1, N-1):
    left[i] = math.gcd(left_gcd, A[i])

right_gcd = A[-1]
right[-1] = A[-1]
for i in range(N-2, 0, -1):
    right[i] = math.gcd(right_gcd, A[i])

# print(left, right)
max_val = max(left[-2], right[1])
for i in range(1, N-1):
    max_val = max(max_val, math.gcd(left[i-1], right[i+1]))

print(max_val)

Fixed submission:
from fractions import gcd

NN = 202020
MOD = 10**9+7
INF = float("inf")

N = int(input())
A = list(map(int, input().split()))
left = [0]*N
right = [0]*N

left[0] = A[0]
for i in range(1, N-1):
    left[i] = gcd(left[i-1], A[i])

right[-1] = A[-1]
for i in range(N-2, 0, -1):
     right[i] = gcd(right[i+1], A[i])

# print(left, right)
max_val = max(left[-2], right[1])
for i in range(1, N-1):
    max_val = max(max_val, gcd(left[i-1], right[i+1]))

print(max_val)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))
left = [0]*N
right = [0]*N

left_gcd = A[0]
left[0] = A[0]
for i in range(1, N-1):
    left[i] = math.gcd(left_gcd, A[i])

right_gcd = A[-1]
right[-1] = A[-1]
for i in range(N-2, 0, -1):
    right[i] = math.gcd(right_gcd, A[i])

# print(left, right)
max_val = max(left[-2], right[1])
for i in range(1, N-1):
    max_val = max(max_val, math.gcd(left[i-1], right[i+1]))

print(max_val)

Fixed submission:
from fractions import gcd

NN = 202020
MOD = 10**9+7
INF = float("inf")

N = int(input())
A = list(map(int, input().split()))
left = [0]*N
right = [0]*N

left[0] = A[0]
for i in range(1, N-1):
    left[i] = gcd(left[i-1], A[i])

right[-1] = A[-1]
for i in range(N-2, 0, -1):
     right[i] = gcd(right[i+1], A[i])

# print(left, right)
max_val = max(left[-2], right[1])
for i in range(1, N-1):
    max_val = max(max_val, gcd(left[i-1], right[i+1]))

print(max_val)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
A = list(map(int, input().split()))
digit = {1:2, 2:5, 3:5, 4:4, 5:5, 6:6, 7:3, 8:7, 9:6}


def dfs(k):
    if k == 0:
        return 0, -1
    if k in memo:
        return memo[k]

    max_value = -1
    max_d = -1
    for num in A:
        if k >= digit[num]:
            suf, d = dfs(k-digit[num])
            if suf >= 0:
                value = num*(10**(d+1))+suf
                if value > max_value:
                    max_value = value
                    max_d = d+1

    memo[k] = (max_value, max_d)
    return max_value, max_d


memo = dict()
print(dfs(n)[0])

Fixed submission:
n, m = map(int, input().split())
A = list(map(int, input().split()))
digit = {1:2, 2:5, 3:5, 4:4, 5:5, 6:6, 7:3, 8:7, 9:6}

dp = [(-1, -1)]*(n+1)
dp[0] = (0, -1)
for k in range(1, n+1):
    max_value = -1
    max_d = -1
    for num in A:
        if k >= digit[num]:
            suf, d = dp[k - digit[num]]
            if suf >= 0:
                value = num * (10 ** (d + 1)) + suf
                if value > max_value:
                    max_value = value
                    max_d = d + 1

    dp[k] = (max_value, max_d)
print(dp[n][0])
Buggy python submission (verdict: Time Limit Exceeded):
n, z, w = map(int, input().split())
A = list(map(int, input().split()))


def calc(yv, idx):
    max_value = abs(yv - A[-1])
    max_value = max(max_value, min([abs(A[i]-A[-1]) for i in range(idx, n)]))

    for i in range(idx+1, n-1):
        max_value = max(max_value, calc(A[i], i+1))

    memo[idx] = max_value
    return max_value


memo = {}
print(calc(w, 0))

Fixed submission:
n, z, w = map(int, input().split())
A = list(map(int, input().split()))

if n == 1:
    print(abs(A[0]-w))
else:
    print(max(abs(A[-1]-w), abs(A[-2]-A[-1])))
Buggy python submission (verdict: Runtime Error):
n = int(input())
A = list(map(int, input().split()))

pre = [0]*(n+1)
pre_list = [e for e in A[:n]]
heapq.heapify(pre_list)
pre_sum = sum(pre_list)
pre[0] = pre_sum
for i in range(n, 2*n):
    small = heapq.heappushpop(pre_list, A[i])
    pre_sum += A[i] - small
    pre[i-n+1] = pre_sum

suf = [0]*(n+1)
suf_list = [-e for e in A[2*n:]]
heapq.heapify(suf_list)
suf_sum = -sum(suf_list)
suf[-1] = suf_sum
for i in range(2*n-1, n-1, -1):
    large = -heapq.heappushpop(suf_list, A[i])
    suf_sum += A[i] - large
    suf[i-n] = suf_sum

# print(pre)
# print(suf)

print(max([pre[i] - suf[i] for i in range(n+1)]))


Fixed submission:
import heapq

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

pre = [0]*(n+1)
pre_list = [e for e in A[:n]]
heapq.heapify(pre_list)
pre_sum = sum(pre_list)
pre[0] = pre_sum
for i in range(n, 2*n):
    small = heapq.heappushpop(pre_list, A[i])
    pre_sum += A[i] - small
    pre[i-n+1] = pre_sum

suf = [0]*(n+1)
suf_list = [-e for e in A[2*n:]]
heapq.heapify(suf_list)
suf_sum = -sum(suf_list)
suf[-1] = suf_sum
for i in range(2*n-1, n-1, -1):
    large = -heapq.heappushpop(suf_list, -A[i])
    suf_sum += A[i] - large
    suf[i-n] = suf_sum

# print(pre)
# print(suf)

print(max([pre[i] - suf[i] for i in range(n+1)]))
Buggy python submission (verdict: Runtime Error):
from sys import exit
import copy
import numpy as np
#from collections import deque


h, w, k = map(int, input().split())
c = [list(input()) for _ in range(h)]
# print(c)


def count(arr):
    cnt = 0
    for l in arr:
        for i in l:
            if i == "#":
                cnt += 1

    return cnt


ans = 0
for i in range(2 ** w):
    tmp = copy.deepcopy(c)
    for j in range(w):
        if ((i >> j) & 1):
            for s in range(h):
                tmp[s][j] = '$'

    for t in range(2 ** h):
        tmp2 = copy.deepcopy(tmp)
        for j in range(h):
            if ((t >> j) & 1):
                for s in range(w):
                    tmp2[j][s] = '$'
        # for l in tmp2:
        #     print(l)
        if count(tmp2) == k:
            ans += 1

print(ans)


Fixed submission:
from sys import exit
import copy
import numpy as np
#from collections import deque


h, w, k = map(int, input().split())
c = [list(input()) for _ in range(h)]
# print(c)


def count(arr):
    cnt = 0
    for l in arr:
        for i in l:
            if i == "#":
                cnt += 1

    return cnt


ans = 0
for i in range(2 ** w):
    tmp = copy.deepcopy(c)
    for j in range(w):
        if ((i >> j) & 1):
            for s in range(h):
                tmp[s][j] = '$'

    for t in range(2 ** h):
        tmp2 = copy.deepcopy(tmp)
        for j in range(h):
            if ((t >> j) & 1):
                for s in range(w):
                    tmp2[j][s] = '$'
        # for l in tmp2:
        #     print(l)
        if count(tmp2) == k:
            ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
from sys import exit
import copy
# import numpy as np
from collections import deque

n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

cnt = 0


a.insert(0, 0)
b.insert(0, 0)


for i in range(1, n+1):
    a_sum[i] += a_sum[i-1]

for i in range(1, m+1):
    b_sum[i] += b_sum[i-1]


for i in range(n+1):
    for j in range(m+1):
        if a_sum[i] + b_sum[j] <= k:
            pass
        else:
            if a_sum[i] + b_sum[j-1] <= k:
                cnt = max(cnt, i + j - 1)
            break
    else:
        if a_sum[i] + b_sum[j] <= k:
            cnt = max(cnt, i + j)
print(cnt)


Fixed submission:
from sys import exit
#import copy
#import numpy as np
#from collections import deque


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

print(int(a+a**2+a**3))
Buggy python submission (verdict: Runtime Error):
if b - a > 0:
    b_f = min(b+t*w, 10 ** 9)
    a_f = min(a+t*v, 10 ** 9)
    if b_f > a_f:
        print("NO")
    else:
        print("YES")


else:
    b_f = max(b-t*w, -10 ** 9)
    a_f = max(a-t*v, -10 ** 9)
    if b_f < a_f:
        print("NO")
    else:
        print("YES")

Fixed submission:
import numpy as np
import sys
# import copy


def xnxn(n=0, flag="v"):
    """
    args:
        int n: a number of lows to read
    example:
        input   1
        retrun  1

        input   1 2 3
        return  [1,2,3]
        input   1 2 3
                4
        return  [[1,2,3],
                [4]]
    """
    if n == 0:
        temp = list(map(int, input().split()))
        if len(temp) == 1:
            if flag == "l":
                return temp
            else:
                return temp[0]
        elif len(temp) > 1:
            return temp
    else:
        temp = [list(map(int, input().split())) for _ in range(n)]
        return temp


a, v = xnxn()
b, w = xnxn()
t = xnxn()


# for i in range(t):
#     if b - a > 0:
#         b = min(b + w, 10 ** 9)
#         a = min(a + v, 10 ** 9)
#         if b == a:
#             print("YES")
#             sys.exit()
#     elif b - a < 0:
#         b = max(b - w, 10 ** 9)
#         a = max(a - v, 10 ** 9)
#         if b == a:
#             print("YES")
#             sys.exit()

# print("NO")

if b - a > 0:
    # b_f = min(b+t*w, 10 ** 9)
    # a_f = min(a + t * v, 10 ** 9)
    b_f = b+t*w
    a_f = a+t*v
    if b_f > a_f:
        print("NO")
    else:
        print("YES")


else:
    # b_f = max(b-t*w, -10 ** 9)
    # a_f = max(a-t*v, -10 ** 9)
    b_f = b-t*w
    a_f = a-t*v

    if b_f < a_f:
        print("NO")
    else:
        print("YES")
Buggy python submission (verdict: Runtime Error):

a, b = list(input().split())

a = int(a)
b = b.replace(".","")
b= int(b)
print(int(a*b/100)

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

a = int(a)
b = b.replace(".", "")
b = int(b)
print(int(a*b)//100)

Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys
#import copy


def xnxn(n=0):
    """
    args:
        int n: a number of lows to read
    example:
        input   1
        retrun  1

        input   1 2 3
        return  [1,2,3]
        input   1 2 3
                4 
        return  [[1,2,3],
                [4]]
    """
    if n == 0:
        temp = list(map(int, input().split()))
        if len(temp) == 1:
            return temp[0]
        elif len(temp) > 1:
            return temp
    else:
        temp = [list(map(int, input().split())) for _ in range(n)]
        return temp


def sp_xnxn(n=0):
    """
    args:
        int n: a number of lows to read
    example
        input   1
        retrun  [1]

        input   123
        return  [1,2,3]

        input   123
                4 
        return  [[1,2,3],
                [4]]
    """
    if n == 0:
        return [int(k) for k in xsxs()]
    else:
        return [[int(k) for k in xsxs()] for _ in range(n)]


def xsxs(n=0):
    """
    args:
        int n: a number of lows to read 
    example:
        input   AA
        retrun  AA

        input   A BBB CC
        return  ["A","BBB","CC"]

        input   A BB CCC
                D
        return  [["A","BBB","CC"],
                ["D"]]
    """
    if n == 0:
        temp = list(input().split())
        if len(temp) == 1:
            return temp[0]
        elif len(temp) > 1:
            return temp
    else:
        return [list(input().split()) for _ in range(n)]


def sp_xsxs(n=0):
    """
    args:
        int n: a number of lows to read 
        example:
            input   A
            retrun  ["A"]

            input   ABC
            return  ["A","B","C"]

            input   ABC
                    D
            return  [["A","B","C"],
                    ["D"]]
    """
    if n == 0:
        return [s for s in xsxs()]
    else:
        return [[s for s in xsxs()] for _ in range(n)]


a, b = xnxn()

print(int(a*b))


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

a = int(a)
b = b.replace(".", "")
b = int(b)
print(int(a*b)//100)