TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N = int(input())
x = [] * N
y = [] * N
for i in range(N):
    a, b = list(map(int, input().split()))
    x.append(a)
    y.append(b)
d = 0
ma = x[0] + y[0]
ima = 0
mi = x[0] + y[0]
imi = 0
for i in range(N):
    if x[i] + y[i] < mi:
        mi = x[i] + y[i]
        imi = i
    if x[i] + y[i] > ma:
        ma = x[i] + y[i]
        ima = i
print (ima, imi)
d = abs(x[ima] - x[imi]) + abs(y[ima] - y[imi])
print(d)

N = int(input())
x = [] * N
y = [] * N
for i in range(N):
    a, b = list(map(int, input().split()))
    x.append(a)
    y.append(b)
d = 0
ma = x[0] + y[0]
ima = 0
mi = x[0] + y[0]
imi = 0
for i in range(N):
    if x[i] + y[i] < mi:
        mi = x[i] + y[i]
        imi = i
    if x[i] + y[i] > ma:
        ma = x[i] + y[i]
        ima = i
d1 = abs(x[ima] - x[imi]) + abs(y[ima] - y[imi])
ma = - x[0] + y[0]
ima2 = 0
mi = - x[0] + y[0]
imi2 = 0
for i in range(N):
    if -x[i] + y[i] < mi:
        mi = -x[i] + y[i]
        imi2 = i
    if -x[i] + y[i] > ma:
        ma = -x[i] + y[i]
        ima2 = i
d2 = abs(x[ima2] - x[imi2]) + abs(y[ima2] - y[imi2])
if d1 > d2:
    print(d1)
else:
    print(d2)

Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N = int(input())
v = [list(map(input().split)) for i in range(N)]
v.sort(key = lambda x:abs(x[0]) + abs(x[1]))
d = abs(v[0][0] - v[N-1][0]) + abs(v[0][1] - v[N-1][1])
print(d)


N = int(input())
v = [list(map(int, input().split())) for i in range(N)]
minx = min([v[i][0] for i in range(N)])
miny = min([v[i][1] for i in range(N)])
v.sort(key = lambda x:x[0] - minx + x[1] - miny)
d = abs(v[0][0] - v[N-1][0]) + abs(v[0][1] - v[N-1][1])
result = d
v.sort(key = lambda x:x[0] - minx - (x[1] - miny))
d = abs(v[0][0] - v[N-1][0]) + abs(v[0][1] - v[N-1][1])
print(max(d, result))

Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
# -*- coding: utf-8 -*-

import math


def get_input() -> int:
    
    S = int(input())

    return S


def combinations_count(n: int, r: int) -> int:
    
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


def main(S: int) -> None:
    
    
    a = S // 3
    b = S % 3
    ans = 0
    while a > 0:
        ans += combinations_count(b + a - 1, b)
        a -= 1
        b += 3
    ans %= 10**9 + 7

    
    print(ans)


if __name__ == "__main__":
    
    S = get_input()

    
    main(S)


# -*- coding: utf-8 -*-

import sys


def get_input() -> tuple:
    
    N = int(input())
    x, y = [], []
    for i in range(N):
        x_i, y_i = list(map(int, input().split()))
        x.append(x_i)
        y.append(y_i)

    return N, x, y


def main(N: int, x: list, y: list) -> None:
    
    
    max_z = -sys.maxsize
    min_z = sys.maxsize
    max_w = -sys.maxsize
    min_w = sys.maxsize
    for x_i, y_i in zip(x, y):
        z_i = x_i + y_i
        max_z = max(max_z, z_i)
        min_z = min(min_z, z_i)
        w_i = x_i - y_i
        max_w = max(max_w, w_i)
        min_w = min(min_w, w_i)
    ans = max(max_z - min_z, max_w - min_w)

    
    print(ans)


if __name__ == "__main__":
    
    N, x, y = get_input()

    
    main(N, x, y)


Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
def manhattan(n, x, y):
    x2 = [0] * n
    y2 = [0] * n
    for i in range(n):
        x0, y0 = xy[i]
        x2[i] = x0 - y0
        y2[i] = x0 + y0
    print(max(max(x2) - min(x2), max(y2) - min(y2)))

n = int(input())
x = [0] * n
y = [0] * n
for i in range(n):
    x[i] , y[i] = map(int, input().split())
manhattan(n, x, y)


def manhattan(n, x, y):
    x2 = [0] * n
    y2 = [0] * n
    for i in range(n):
        x2[i] = x[i] - y[i]
        y2[i] = x[i] + y[i]
    print(max(max(x2) - min(x2), max(y2) - min(y2)))

n = int(input())
x = [0] * n
y = [0] * n
for i in range(n):
    x[i] , y[i] = map(int, input().split())
manhattan(n, x, y)


Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
n = int(input())
xy = [list(map(int,input().split())) for i in range(n)]
cheby = []
for i in range(n):
    l = [xy[i][0]-xy[i][1],xy[i][0]+xy[i][1]]
    cheby.append(l)

xmax = 0
xmin = 10**10
ymax = 0
ymin = 10**10
for i in range(n):
    if cheby[i][0] >= xmax :
        xmax = cheby[i][0]
        xa = i
    if cheby[i][0] =< xmin :
        xmin = cheby[i][0]
        xi = i
    if cheby[i][1] >= ymax :
        ymax = cheby[i][1]
        ya = i
    if cheby[i][1] =< ymin :
        ymin = cheby[i][1]
        yi = i

if abs(xmax-xmin) > abs(ymax-ymin):
    print(abs(xy[xa][0]-xy[xi][0])+abs(xy[xa][1]-xy[xi][1]))
else :
    print(abs(xy[ya][0]-xy[yi][0])+abs(xy[ya][1]-xy[yi][1]))


n = int(input())
xy = [list(map(int,input().split())) for i in range(n)]
cheby = []
for i in range(n):
    l = [xy[i][0]-xy[i][1],xy[i][0]+xy[i][1]]
    cheby.append(l)

xmax = -10**10
xmin = 10**10
ymax = -10**10
ymin = 10**10
for i in range(n):
    if cheby[i][0] > xmax :
        xmax = cheby[i][0]
        xa = i
    if cheby[i][0] < xmin :
        xmin = cheby[i][0]
        xi = i
    if cheby[i][1] > ymax :
        ymax = cheby[i][1]
        ya = i
    if cheby[i][1] < ymin :
        ymin = cheby[i][1]
        yi = i

if abs(xmax-xmin) > abs(ymax-ymin):
    print(abs(xy[xa][0]-xy[xi][0])+abs(xy[xa][1]-xy[xi][1]))
else :
    print(abs(xy[ya][0]-xy[yi][0])+abs(xy[ya][1]-xy[yi][1]))


Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N = int(input())
#i = 0
a_max = 2
a_min = 2*(10**9)
s_max = 0
s_min = 10**9

for i in N:
    x,y=map(int,input().split())
    add = x+y
    sub = x-y

    if add > a_max:
        a_max = add
    if add < a_min:
        a_min = add
    if sub > s_max:
        s_max = sub
    if sub < s_max:
        s_max = sub

d_add = a_max - a_min
d_sub = s_max - s_min

print(max(d_add,d_sub))

N = int(input())
i = 0
a_max = 2
a_min = 2*(10**9)
s_max = 0
s_min = 1-10**9

for i in range(N):
    x,y=map(int,input().split())
    add = x+y
    sub = x-y

    if add > a_max:
        a_max = add
    if add < a_min:
        a_min = add
    
    if sub > s_max:
        s_max = sub
    if sub < s_min:
        s_min = sub

d_add = a_max - a_min
d_sub = s_max - s_min


#    print(d_add)

#    print(d_sub)
print(max(d_add,d_sub))

N = int(input())
i = 0
a_max = 2
a_min = 2*(10**9)
s_max = 1-10**9
s_min = 10**9-1

for i in range(N):
    x,y=map(int,input().split())
    add = x+y
    sub = x-y

    if add > a_max:
        a_max = add
    if add < a_min:
        a_min = add
    
    if sub > s_max:
        s_max = sub
    if sub < s_min:
        s_min = sub

d_add = a_max - a_min
d_sub = s_max - s_min


#    print(d_add)

#    print(d_sub)
print(max(d_add,d_sub))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
import sys, math
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N = ii()
    x, y = i2(N)

    Mw = max(x[i]+y[i] for i in range(N))
    mw = min(x[i]+y[i] for i in range(N))
    Mz = max(abs(a[i]-y[i]) for i in range(N))
    mz = min(abs(x[i]-y[i]) for i in range(N))

    print(max(Mz-mz, Mw-mw))
    


if __name__ == '__main__':
    main()


import sys, math
from functools import lru_cache
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    N = ii()
    x, y = i2(N)

    Mw = max(x[i]+y[i] for i in range(N))
    mw = min(x[i]+y[i] for i in range(N))
    Mz = max(x[i]-y[i] for i in range(N))
    mz = min(x[i]-y[i] for i in range(N))

    print(max(Mz-mz, Mw-mw))
    


if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):


import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    amax = [0, 0]
    amin = [10**20, 10**20]
    for _ in range(n):
        x, y = na()
        amin[0] = min(amin[0], x+y)
        amax[0] = max(amax[0], x+y)
        amin[1] = min(amin[1], (10**10-x)+y)
        amax[0] = max(amax[1], (10**10-x)+y)
    print(max(amax[0]-amin[0], amax[1]-amin[1]))
if __name__ == "__main__":
    main()



import sys
stdin = sys.stdin

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    amax = [0, 0]
    amin = [10**20, 10**20]
    for _ in range(n):
        x, y = na()
        amin[0] = min(amin[0], x+y)
        amax[0] = max(amax[0], x+y)
        amin[1] = min(amin[1], -x+y)
        amax[1] = max(amax[1], -x+y)
    print(max(amax[0]-amin[0], amax[1]-amin[1]))
if __name__ == "__main__":
    main()

Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
2
1 1
1 1

N=int(input())
xy = [map(int, input().split()) for _ in range(N)]
x, y = [list(i) for i in zip(*xy)]

xyp=[]
xym=[]
for i in range(N):
    xyp.append(x[i]+y[i])
    xym.append(x[i]-y[i])
    
print(max(max(xyp)-min(xyp),-min(xym)+max(xym),max(xym)-min(xym),-min(xym)+max(xym)))

Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N=int(input())
A=[list(map(int, input().split()))]

temp1=cp.deepcopy(A[0])
temp2=cp.deepcopy(A[0])
for i in range(N-1):
    f=0
    x,y=map(int, input().split())
    if abs(temp1[0]-x)+abs(temp1[1]-y):
        temp2[0]=x
        temp2[1]=y
        f=1
    if f==1:
        for i,j in A:
           if max(abs(temp2[0]-i)+abs(temp2[1]-j),abs(temp2[0]-temp1[0])+abs(temp2[1]-temp1[1])):
               temp1[0]=i
               temp2[1]=j
    A.append([x,y])


print(abs(temp2[0]-temp1[0])+abs(temp2[1]-temp1[1]))

N=int(input())
A=[0]*(N)
B=[0]*(N)
for i in range(N):
    x,y=map(int, input().split())
    A[i]=x+y
    B[i]=x-y

A=sorted(A)
B=sorted(B)

print(max(A[-1]-A[0],B[-1]-A[0],A[-1]-A[0],B[-1]-B[0]))

Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
import sys
def input(): return sys.stdin.readline().rstrip()

N = int(input())
X = []
Y = []
for i in range(N):
    x,y = map(int,input().split())
    X.append(x)
    Y.append(y)

ans1 = []
ans2 = []
for i in range(N):
    ans1.append(X[i] + Y[i])
    ans2.append(Y[i] - X[i])
ans1.sort()
ans2.sort()

a = ans1[-1] - ans1[1]
b = ans2[-1] - ans2[1]

print(max(a,b))

import sys
def input(): return sys.stdin.readline().rstrip()

N = int(input())
X = []
Y = []
for i in range(N):
    x,y = map(int,input().split())
    X.append(x)
    Y.append(y)

ans1 = []
ans2 = []
for i in range(N):
    ans1.append(X[i] + Y[i])
    ans2.append(Y[i] - X[i])
ans1.sort()
ans2.sort()

a = ans1[-1] - ans1[0]
b = ans2[-1] - ans2[0]

print(max(a,b))

Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
n = int(input())

z_vec = [0] * n
w_vec = [0] * n


for i in range(0, n + 1):
    line = input()
    tmp = line.split()
    z_vec[i] = int(tmp[0]) + int(tmp[1])
    w_vec[i] = int(tmp[0]) - int(tmp[1])

z_ans = max(z_vec) - min(z_vec)
w_ans = max(w_vec) - min(w_vec)


print(f'{max(z_ans, w_ans)}')

n = int(input())

z_vec = [0] * n
w_vec = [0] * n


for i in range(0, n + 1):
    tmp = input().split()
    z_vec[i] = int(tmp[0]) + int(tmp[1])
    w_vec[i] = int(tmp[0]) - int(tmp[1])

z_ans = max(z_vec) - min(z_vec)
w_ans = max(w_vec) - min(w_vec)


print(f'{max(z_ans, w_ans)}')

n = int(input())

p_one = input()
p_one_list = p_one.split(' ')

zmax = int(p_one_list[0]) + int(p_one_list[1])
zmin = int(p_one_list[0]) + int(p_one_list[1])
wmax = int(p_one_list[0]) - int(p_one_list[1])
wmin = int(p_one_list[0]) - int(p_one_list[1])


for i in range(1, n):
    line = input()
    tmp = line.split(' ')
    z = int(tmp[0]) + int(tmp[1])
    w = int(tmp[0]) - int(tmp[1])
    zmax = max(zmax, z)
    wmax = max(wmax, w)
    zmin = min(zmin, z)
    wmin = min(wmin, w)


z_ans = zmax - zmin
w_ans = wmax - wmin


print(f'{max(z_ans, w_ans)}')


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
n = int(input())
xy = []
for _ in range(n):
    xy.append(list(map(int,input().split())))
a,b=xy[0]
m1=a+b
p1=xy[0]
m2=a-b
p2=xy[0]
p3=xy[0]
p4=xy[0]
m3=-a-b
m4=-a+b

for x,y in xy:
    if x+y > m1:
        p1 = [x,y]
if x-y > m2:
        p2 = [x,y]
if -x-y > m3:
        p3 = [x,y]
if -x+y > m4:
        p4 = [x,y]
m = 0
for x0,y0 in [p1,p2,p3,p4]:
    for x1,y1 in [p1,p2,p3,p4]:
        dis=abs(x0-x1) + abs(y0-y1)
        if dis > m:
            m = dis
print(m)

n = int(input())
xy = [list(map(int,input())) for _ in range(n)]
max = 0
for xy1 in xy:
  for xy2 in xy:
    dis = abs(xy1[0]-xy2[0]) + abs(xy1[1]-xy2[1])
    if dis > max:
      max = dis
print(max)

n = int(input())
xy = []
for _ in range(n):
    xy.append(list(map(int,input().split())))
a,b=xy[0]
m1=a+b
p1=xy[0]
m2=a-b
p2=xy[0]
p3=xy[0]
p4=xy[0]
m3=-a-b
m4=-a+b

for x,y in xy:
    if x+y > m1:
        m1=x+y
        p1 = [x,y]
    if x-y > m2:
        m2=x-y
        p2 = [x,y]
    if -x-y > m3:
        m3 = -x-y
        p3 = [x,y]
    if -x+y > m4:
        m4 = -x+y
        p4 = [x,y]
m = 0
for x0,y0 in [p1,p2,p3,p4]:
    for x1,y1 in [p1,p2,p3,p4]:
        dis=abs(x0-x1) + abs(y0-y1)
        if dis > m:
            m = dis
print(m)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
n = int (input())

xy = []

def dist(a, b):
    return abs(a[0]-b[0]) + abs(a[1]-b[1])
    
for i in range(n):
    x, y = map(int,input().split())
    xy.append([x+y, x-y])

xy.sort(key = lambda x: x[0]+x[1])

dist(xy[0], xy[-1])


ans = 0
l = int((n//2)**0.5)
for i in range(l):
    for j in range(l+1):
        ans = max(ans, dist(xy[i], xy[n-1-j]))

print(ans)


n = int (input())

xy = []

def dist(a, b):
    return abs(a[0]-b[0]) + abs(a[1]-b[1])
    
for i in range(n):
    x, y = map(int,input().split())
    xy.append([x+y, x-y])

xy.sort(key = lambda x: x[0])

min_z = xy[0][0]
max_z = xy[-1][0]

xy.sort(key = lambda x: x[1])

min_w = xy[0][1]
max_w = xy[-1][1]

print(max(abs(min_z - max_z), abs(min_w - max_w)))


Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N = int(input())
xy = [map(int, input().split()) for _ in range(N)]


def get_output():
    dist = [0 for _ in range(N)]
    min_x, max_x = 0, 0
    min_y, max_y = 0, 0

    for i, (x, y) in enumerate(xy):
        x, y = (x-y), (x+y)

        min_x = min(x, min_x)
        min_y = min(y, min_y)
        max_x = max(x, max_x)
        max_y = max(y, max_y)

    return max(max_x - min_x, max_y - min_y)


print(get_output())


N = int(input())
xy = [map(int, input().split()) for _ in range(N)]


def get_output():
    dist = [0 for _ in range(N)]
    X, Y = [], []

    for i, (x, y) in enumerate(xy):
        x, y = x-y, x+y
        X.append(x)
        Y.append(y)

    a = max(X) - min(X)
    b = max(Y)-min(Y)
    return max(a, b)


print(get_output())


Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
XY = []
xAve = 0
yAve = 0
for _ in range(N):
    x,y=map(int,input().split())
    if (x,y) not in XY
        XY.append((x,y))
        xAve += x
        yAve += y
xAve = xAve//N
yAve = yAve//N
XYnorm = [0]*4
for x,y in XY:
    nX = x-xAve
    nY = y-yAve
    if nX>=0 and nY>0:
        XYnorm[0]=max(XYnorm[0],nX+nY)
    if nX <0 and nY >=0:
        XYnorm[1]=max(XYnorm[1],-nX+nY)
    if nX <=0 and nY <0:
        XYnorm[2]=max(XYnorm[2],-nX-nY)
    if nX >0 and nY <=0:
        XYnorm[3]=max(XYnorm[3],nX-nY)
print(int(max(XYnorm[2]+XYnorm[0],XYnorm[3]+XYnorm[1])))
    


import sys,math,collections,itertools
input = sys.stdin.readline

N=int(input())
zmax=-float('inf')
zmin = float('inf')
wmax = -float('inf')
wmin = float('inf')

for _ in range(N):
    x,y=map(int,input().split())
    z=x+y
    w=x-y
    zmax = max(z,zmax)
    zmin = min(z,zmin)
    wmax = max(w,wmax)
    wmin = min(w,wmin)
print(max(zmax-zmin,wmax-wmin))


Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
n = int(input())
maxx, minx, maxy, miny = -1**10, 1**10, -1**10, 1**10
for _ in range(n):
	x, y = map(int, input().split())
	x, y = x+y, x-y
	maxx = max(maxx, x)
	minx = min(minx, x)
	maxy = max(maxy, y)
	miny = min(miny, y)
print(max(maxx - minx, maxy - miny))


n = int(input())
maxx, minx, maxy, miny = -10**10, 10**10, -10**10, 10**10
for _ in range(n):
	x, y = map(int, input().split())
	x, y = x+y, x-y
	maxx = max(maxx, x)
	minx = min(minx, x)
	maxy = max(maxy, y)
	miny = min(miny, y)
print(max(maxx - minx, maxy - miny))


Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
a,b=[],
for z in[*open(0)][1:]:x,y=map(int,z.split());a+=x+y,;b+=x-y,
print(max(abs(max(a)-min(a)),abs(max(b)-min(b))))

a,*b=[],
for z in[*open(0)][1:]:x,y=map(int,z.split());a+=x+y,;b+=x-y,
print(max(max(a)-min(a),max(b)-min(b)))

Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
n = int(input())
u = [list(map(int, input().split())) for i in range(n)]
z = [u[i][0] + u[i][1] for i in range(n)]
w = [w[i][0] - w[i][1] for i in range(n)]
d = [max(z)-min(z), max(w)-min(w)]

print(max(d))
	


n = int(input())
z = [[map(int, input().split())] for i in range(n)]
m = 0
d = 0
for i in range(n-1):
  for j in range(i+1, n):
    d = 0
    d += max(z[i][0] - z[j][0], z[j][0] - z[i][0])
    d += max(z[i][1] - z[j][1], z[j][1] - z[i][1])
    if d>m:
      m = d
print(m)
	

n = int(input())
u = [list(map(int, input().split())) for i in range(n)]
z = [u[i][0] + u[i][1] for i in range(n)]
w = [u[i][0] - u[i][1] for i in range(n)]
d = [max(z)-min(z), max(w)-min(w)]

print(max(d))
	


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
import sys

def f(x,y):
    return x-y.x+y

def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    x = [0]*n
    y = [0]*n
    for i in range(n):
        x[i],y[i] = map(int,input().split())
    f0 = [0]*n
    f1 = [0]*n
    for i in range(n):
        f0[i],fi[i] = f(x[i],y[i])
    print(max(max(f0)-minf(0),max(f1)-minf(1)))

if __name__ = "__main__":
    main()

import sys

def f(x,y):
    return x-y,x+y

def main():
    n = int(input())
    x = [0]*n
    y = [0]*n
    for i in range(n):
        x[i],y[i] = map(int,input().split())
    f0 = [0]*n
    f1 = [0]*n
    for i in range(n):
        f0[i],f1[i] = f(x[i],y[i])
    print(max(max(f0)-min(f0),max(f1)-min(f1)))

if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):


import sys


def input() -> str:  
    """Input."""
    return sys.stdin.readline()[:-1]


def calc(p1: list, p2: list) -> int:
    """Calc Manhattan Distance."""
    return abs(p2[1] - p1[1]) + abs(p2[0] - p1[0])


def main():
    """Run."""
    n = int(input())

    p1 = p2 = None
    for _ in range(n):
        p = list(map(int, input().split(' ')))
        if not p1:
            p1 = p
        elif not p2:
            p2 = p
        else:
            p1_max = calc(p1, p)
            p2_max = calc(p1, p)

            if p1_max >= p2_max:
                p2 = p
            else:
                p1 = p

    print(calc(p1, p2))
    """
    patterns = {
        'lt': (1, 1),
        'rt': (-1, 1),
        'lb': (-1, -1),
        'rb': (1, -1),
    }

    points: dict = {k: None for k in patterns.keys()}

    for _ in range(n):
        p = list(map(int, input().split(' ')))

        for k, (x, y) in patterns.items():
            max_p = points[k]

            if max_p:
                max_p_pos = (max_p[0] * x) + (max_p[1] * y)
                p_pos = (p[0] * x) + (p[1] * y)
                if max_p_pos < p_pos:
                    points[k] = p
            else:
                points[k] = p

    ans = 0
    for i, p1 in enumerate(points.values()):
        for p2 in list(points.values())[i + 1:]:
            ans = max(ans, calc(p1, p2))

    print(ans)
    """


main()




import sys


def input() -> str:  
    """Input."""
    return sys.stdin.readline()[:-1]


def calc(p1: list, p2: list) -> int:
    """Calc Manhattan Distance."""
    return abs(p2[1] - p1[1]) + abs(p2[0] - p1[0])


def main():
    """Run."""
    n = int(input())

    patterns = {
        'lt': (1, 1),
        'rt': (-1, 1),
        'lb': (-1, -1),
        'rb': (1, -1),
    }

    points: dict = {k: None for k in patterns.keys()}

    for _ in range(n):
        p = list(map(int, input().split(' ')))

        for k, (x, y) in patterns.items():
            max_p = points[k]

            if max_p:
                max_p_pos = (max_p[0] * x) + (max_p[1] * y)
                p_pos = (p[0] * x) + (p[1] * y)
                if max_p_pos < p_pos:
                    points[k] = p
            else:
                points[k] = p

    ans = 0
    for i, p1 in enumerate(points.values()):
        for p2 in list(points.values())[i + 1:]:
            ans = max(ans, calc(p1, p2))

    print(ans)


main()


Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
from numba import jit
n=int(input())
data=[]
for _ in range(n):
    data.append(list(map(int,input().split())))
    
@jit
def main():
    ans=0
    for i in range(0,n-1):
        for j in range(i+1,n):
            d=abs(data[i][0]-data[j][0])+abs(data[i][1]-data[j][1])
            ans=max(ans,d)
    print(ans)
    
if __name__=="__main__":
    main()

n=int(input())
data=[]
for _ in range(n):
    data.append(list(map(int,input().split())))

data_sum=[]
for i in range(n):
    data_sum.append(data[i][0]+data[i][1])


data_sum_1=[]
for i in range(n):
    data_sum_1.append(data[i][1]-data[i][0])

d_1=max(data_sum)-min(data_sum)
d_2=max(data_sum_1)-min(data_sum_1)

print(max(d_1,d_2))

Verdicts: Time Limit Exceeded

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N = int(input())
Y_MAX = 0
Y_MIN = 1000000000000

for i in range(N):
    x, y = map(int, input().split())
    if abs(0 - x) + abs(y - 1000000000000) > Y_MAX:
        Y_MAX = abs(0 - x) + abs(y - 1000000000000)
    if abs(0 - x) + abs(y - 1000000000000) < Y_MIN:
        Y_MIN = abs(0 - x) + abs(y - 1000000000000)
  
print(Y_MAX - Y_MIN)


import sys
input=sys.stdin.buffer.readline
inputs=sys.stdin.buffer.readlines
sys.setrecursionlimit(10**9)

n=int(input())
table=[(x-y,x+y)for x,y in [map(int,input().split()) for i in range(n)]]
a,b=[table[0][0]]*2,[table[0][1]]*2
ans=0
for x,y in table:
    ans=max(ans,abs(x-a[0]),abs(x-a[1]),abs(y-b[0]),abs(y-b[1]))
    a[0]=min(x,a[0])
    a[1]=max(a[1],x)
    b[0]=min(b[0],y)
    b[1]=max(b[1],y)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N = int(input())
x, y = map(int, input().split())
d = [x - y, x - y, x + y, x + y]
for i in range(1,N):
  x, y = map(int, input().split())
  d[0] = max(d[0], x-y)
  d[1] = min(d[1], x-y)
  d[2] = max(d[2], x+y)
  d[3] = min(d[3], x+y)
print(d)
print(max(d[0]-d[1], d[2]-d[3]))

N = int(input())
x, y = map(int, input().split())
d = [x - y, x - y, x + y, x + y]
for i in range(1,N):
  x, y = map(int, input().split())
  d[0] = max(d[0], x-y)
  d[1] = min(d[1], x-y)
  d[2] = max(d[2], x+y)
  d[3] = min(d[3], x+y)
print(max(d[0]-d[1], d[2]-d[3]))

Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N = int(input())
X = []
Y = []
for _ in range(N):
    x,y = map(int, input().split())
    X.append(x)
    Y.append(y)
X = np.array(X)
Y = np.array(Y)
X_ = X.reshape((N,1))
Y_ = Y.reshape((N,1))
Z = np.abs(X-X_)+np.abs(Y-Y_)
z = Z.reshape((1,-1))
print(np.max(z))

# ABC178D Manhattan
n = int(input())
z = []
w = []
for i in range(n):
    x,y = map(int, input().split())
    z.append(x-y)
    w.append(x+y)
    
z_ans = max(z)-min(z)
w_ans = max(w)-min(w)
print(max(z_ans,w_ans))

Verdicts: Runtime Error

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
(n,),*e=[[*map(int,i.split())]for i in open(0)]
a=sorted(e)
b=sorted(e,key=lambda x: x[1])
c=a[:10]+a[:10]+b[10:]+b[:10]
ans=0
for i,j in c:
    for ii,jj in c:
        ans=max(ans,abs(i-ii)+abs(j-jj))

a,b=[],[]
for _ in range(int(input())):
    x,y=map(int,input().split())
    a+=[x-y]
    b+=[x+y]
print(max(max(a)-min(a),max(b)-min(b)))

Verdicts: Wrong Answer

Accepted
Problem: There are N points on the 2D plane, i-th of which is located on (x_i, y_i). There can be multiple points that share the same coordinate. What is the maximum possible Manhattan distance between two distinct points?  Here, the _Manhattan distance_ between two points (x_i, y_i) and (x_j, y_j) is defined by |x_i-x_j| + |y_i-y_j|.

Submission attempts (in order):
N=int(input())
a,b,c,d=0,1e10,-1e10,1e10
for i in range(N):
  A,B=int(input().pulit())
  a=max(a,A+B)
  b=min(b,A+B)
  c=max(c,A-B)
  d=min(d,A-B)
print(max(abs(a-b),abs(c-d))

N=int(input())
a,b,c,d=0,1e10,-1e10,1e10
for i in range(N):
  A,B=input().split()
  A=int(A)
  B=int(B)
  a=max(a,A+B)
  b=min(b,A+B)
  c=max(c,A-B)
  d=min(d,A-B)
print(max(abs(a-b),abs(c-d)))

Verdicts: Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d, t, s = map(int, input().split())
if t >= d/s:
    print("yes")
else:
    print("no")

d, t, s = map(int, input().split())
if t >= d/s:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
def ans():
    if t==0:
        return "N0"
    if d/s < = t:
        return "Yes"
    else:
        return "No"
        
d, t, s = map(int, input().split())
print(ans())

def ans():
    if t==0:
        return "N0"
    if d/s <= t:
        return "Yes"
    else:
        return "No"
        
d, t, s = map(int, input().split())
print(ans())

Verdicts: Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d t s = map(int, input().split())
if d<t*s:
  print('Yes')
else:
  print('No')
  

d t s = map(int, input().split())
if d<=t*s:
  print('Yes')
else:
  print('No')
 

d, t, s = map(int, input().split())
if d<=t*s:
  print('Yes')
else:
  print('No')
 

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d,t,s=map(int,input().split())
print("Yes" if t>=d*s else "No")

d,t,s=map(int,input().split())
print("Yes" if t>=d/s else "No")

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
x, y,z = map(int, input().split()) 
test = x / z

if (test < y){
    print('Yes')
}else{
    print('No')
}

x, y,z = map(int, input().split()) 
test = x / z

if (test <= y):
    print('Yes')
else:
    print('No')

Verdicts: Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

number = 0
MOD = 1000000007

for i in range(N-1):
    for j in range(i+1, N):
        number += A[i]*A[j]


if number > MOD:
    print(number%MOD)
else:
    print(number)


#!/usr/bin/env python3
import sys
from itertools import accumulate
MOD = 1000000007  # type: int


def solve(N: int, A: "List[int]"):
    aa = list(accumulate(A))
    print(aa)
    x = sum(A)
    print(x)

    ans = 0

    for i in range(N):
        ans += A[i]*(aa[N-1]-aa[i])%MOD
        ans %= MOD
    return print(ans)


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, A)

if __name__ == '__main__':
    main()


#!/usr/bin/env python3
import sys

YES = "Yes"  # type: str
NO = "No"  # type: str


def solve(D: int, T: int, S: int):

    if D <= T*S:
        return print('Yes')
    else:
        return print('No')



# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    D = int(next(tokens))  # type: int
    T = int(next(tokens))  # type: int
    S = int(next(tokens))  # type: int
    solve(D, T, S)

if __name__ == '__main__':
    main()


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
D, T, S = map(int, input().split())
if D / S >= T:
  print('YES')
else:
  print('NO')


D, T, S = map(int, input().split())
if S * T >= D:
  print('YES')
else:
  print('NO')

D, T, S = map(int, input().split())
if D / S <= T:
  print('YES')
else:
  print('NO')


D, T, S = map(int, input().split())
if D / S <= T:
  print('Yes')
else:
  print('No')


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
D, T, S = map(int, input().rstrip().split())
print(D)
dis = S * T
r = 'Yes' if dis >= D else 'No'
print(r)



D, T, S = map(int, input().rstrip().split())
dis = S * T
r = 'Yes' if dis >= D else 'No'
print(r)


Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))
sum = 0
for i in range(n):
    sum += a[i]
sum = sum*sum
for j in range(n):
    sum = sum - a[j]*a[j]
sum = int(sum/2)
print(sum%1000000007)

n = int(input())
a = list(map(int,input().split()))
sum = 0
for i in range(n):
    sum += a[i]
sum = sum*sum
for j in range(n):
    sum = sum - a[j]*a[j]
sum = int(sum/2)
print(sum%1000000007)

n = int(input())
a = list(map(int,input().split()))
sum = 0
for i in range(n):
    sum += a[i]
sum = sum*sum
for j in range(n):
    sum = sum - a[j]*a[j]
sum = sum
print((sum%1000000007)/2)

d,t,s = map(int,input().split())
if d<= s*t:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d,t.s = map(int,input().split())
a = d/s
if t>=a:
    print("Yes")
else:
    print("No")

d,t,s = map(int,input().split())
a = d/s
if t>=a:
    print("Yes")
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d, t, s = map(int, input().split())
print('Yes' if d/s >= t else 'No')

print('Yes' if eval(input().replace(' ','<=',1).replace(' ','*',1)) else 'No')

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d = int(input())
t = int(input())
s = int(input())
if (t*s >= d):
  print("Yes")
else:
  print("No")

d = int(input())
t = int(input())
s = int(input())
if t*s >= d:
  print("Yes")
else:
  print("No")

D, T, S = map(int, input().split())
if T*S >= D:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
m, s, mps = [int(x) for x in input().split()]
time = m / mps

if s >= time:
    print(True)
else:
    print(False)

m, s, mps = [int(x) for x in input().split()]
time = m / mps

if s >= time:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
a,b,c = map(int, input().split()) 
if(b*c<=a):
  print("Yes")
else:
  print("No")

a,b,c = map(int, input().split()) 
if(b*c>=a):
  print("Yes")
else:
  print("No")


Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
str = input()
str = [int(x) for x in str.split()]

if(str[0] <= str[1] * str[2]):
  print("yes")
else:
  print("no")

str = input()
str = [int(x) for x in str.split()]

if(str[0] > str[1] * str[2]):
  print("no")
else:
  print("yes")

str = input()
str = [int(x.strip()) for x in str.split()]

if(str[0] <= str[1] * str[2]):
  print("yes")
else:
  print("no")

str = input()
str = [int(x) for x in str.split()]

if(str[0] <= str[1] * str[2]):
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
D, T, S = map(int, input().split())

if D / S <= T:
    print('Yes')
else:
    print('No')
print(D/S)

D, T, S = map(int, input().split())

if D / S <= T:
    print('Yes')
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d, t, s = (int(x) for x in input().split())
print('Yes' if s*t <= d else 'No')

d, t, s = (int(x) for x in input().split())
print('Yes' if s*t >= d else 'No')

Verdicts: Wrong Answer

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

def solve():
    n, m = map(int, input().split())
    group = []
    done = [-1]*n
    num = 0
    for i in range(m):
        a, b = map(lambda x:int(x)-1, input().split())
        if done[a] != -1:
            if done[b] == -1:
                group[done[a]].append(b)
                done[b] = done[a]
        else:
            if done[b] == -1:
                group.append([a,b])
                done[a], done[b] = num, num
                num += 1
            else:
                group[done[b]].append(a)
                done[a] = done[b]
    people = [0]+[len(i) for i in group]
    print(max(people))
    return 0

if __name__ == "__main__":
    solve()


import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

def solve():
    s = input()
    t = input()
    hoge = 10000
    let = len(t)
    les = len(s)
    ans = 10000
    for i in range(les-let+1):
        hoge = s[i:i+let]
        piyo = 0
        for j, k in zip(hoge,t):
            if j != k:
                piyo += 1
        if piyo < ans:
            ans = piyo
    print(ans)
    return 0

if __name__ == "__main__":
    solve()


import math
import collections
import fractions
import itertools
import functools
import operator
import bisect

def solve():
    d, t, s = map(int, input().split())
    if d > t*s:
        print("No")
    else:
        print("Yes")
    return 0

if __name__ == "__main__":
    solve()


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
d, t, s = input().split()
if t*s >= d:
	return "Yes"
else:
	return "No"

d, t, s = input().split()
if t*s >= d:
	print "Yes"
else:
	print "No"

d, t, s = map(int, input().split())
if t*s >= d:
	print ("Yes")
else:
	print ("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Takahashi is meeting up with Aoki.  They have planned to meet at a place that is D meters away from Takahashi's house in T minutes from now.  Takahashi will leave his house now and go straight to the place at a speed of S meters per minute.  Will he arrive in time?

Submission attempts (in order):
l=[]
for i in range(3):
  l.append(int(input()))
d=l[0]
t=l[1]
s=l[2]

time=d/s
if(time<=t):
  print("Yes")
else:
  print("No")


d,t,s=map(int,input().split())
time=d/s
if(time<=t):
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Accepted