s_id string | p_id string | u_id string | date string | language string | original_language string | filename_ext string | status string | cpu_time string | memory string | code_size string | code string | error string | stdout string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
s826697052 | p02556 | u884244819 | 1600029379 | Python | Python (3.8.2) | py | Runtime Error | 598 | 74844 | 395 | import numpy as np
from scipy.spatial import distance
def main():
n = int(input())
lis = []
for i in range(n+1):
x,y = map(int, input().split())
lis.append([x,y])
M = np.array(lis)
try:
dist_M = distance.cdist(M, M, metric='cityblock')
print(str(np.max(dist_M)).split(... | Traceback (most recent call last):
File "/tmp/tmp8cf629_q/tmpxqd8gs0e.py", line 16, in <module>
main()
File "/tmp/tmp8cf629_q/tmpxqd8gs0e.py", line 4, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s852148597 | p02556 | u710282484 | 1600029373 | Python | Python (3.8.2) | py | Runtime Error | 1708 | 72744 | 320 | n=int(input())
l=[input().split() for _ in range(n)]
dp=[0]*(n+2)
dp1=[0]*(n+2)
for i in range(n):
for j in range(1,n):
dp[i+j] = max(abs(int(l[i][0]) - int(l[j][0])), dp[i+j-1])
dp1[i+j] = max(abs(int(l[i][1]) - int(l[j][1])), dp[i+j-1])
dp=sorted(dp)
dp1=sorted(dp1)
print(int(dp[-1])+int(dp1[-1])) | Traceback (most recent call last):
File "/tmp/tmpvocicn7h/tmp2h80yi9p.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s109464152 | p02556 | u622570247 | 1600029372 | Python | Python (3.8.2) | py | Runtime Error | 461 | 44008 | 416 | import itertools
n = int(input())
ps = list({
tuple(map(int, input().split()))
for _ in range(n)
})
g = sum([p[0] for p in ps]) / len(ps)
g = sum([p[1] for p in ps]) / len(ps)
maxd = 0
maxp = ps[0]
for p in ps:
d = abs(g[0] - p[0]) + abs(g[1] - p[1])
if d > maxd:
maxp = p
maxd = d
ma... | Traceback (most recent call last):
File "/tmp/tmp17su5f7p/tmp9zs1ifvt.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s625455217 | p02556 | u662977802 | 1600029363 | Python | Python (3.8.2) | py | Runtime Error | 429 | 9348 | 1324 | n = int(input())
c = 0
c1 = 0
xx = 0
yy = 0
for i in range(n):
p = input()
q = p.split(" ")
x = int(q[0])
y = int(q[1])
k = i + 1
for j in range(k, n):
m = input()
l = m.split(" ")
a = int(l[0])
b = int(l[1])
if x >= a and y >= b:
... | Traceback (most recent call last):
File "/tmp/tmpoux6ggay/tmpch5tjsad.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s717011666 | p02556 | u585963734 | 1600029348 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9180 | 512 | 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... | Traceback (most recent call last):
File "/tmp/tmpckba9nr0/tmphj290w38.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s543179073 | p02556 | u496407619 | 1600029330 | Python | PyPy2 (7.3.0) | py | Runtime Error | 82 | 64696 | 2039 | for i, (x, y) in enumerate(pairs):
xy = x+y
if i == 0:
min_x = max_x = x
min_y = max_y = y
min_xi = [0]
max_xi = [0]
min_yi = [0]
max_yi = [0]
min_xyi = [0]
max_xyi = [0]
min_xy = max_xy = xy
else:
if x < min_x:
mi... | Traceback (most recent call last):
File "/tmp/tmp4o39zx56/tmpx5gstr60.py", line 1, in <module>
for i, (x, y) in enumerate(pairs):
^^^^^
NameError: name 'pairs' is not defined. Did you mean: 'vars'?
| |
s282194276 | p02556 | u290886932 | 1600029311 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9120 | 250 | N = int(input())
A = list()
for i in range(N):
A.append(list(map(int,input().split())))
ret = 0
for i in range(N-1):
for j in range(i + 1,N):
tmp = abs(A[i][0] - A[j][0]) + abs(A[i][1] - A[j][1])
if ret < tmp:
ret = tmp
return ret
| File "/tmp/tmpphl2w4di/tmpafby138c.py", line 12
return ret
^^^^^^^^^^
SyntaxError: 'return' outside function
| |
s045882910 | p02556 | u469254913 | 1600029291 | Python | Python (3.8.2) | py | Runtime Error | 358 | 66360 | 487 | import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)
def main():
N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
xy = np.array(xy)
# print(xy)
diffs = np.expand_dims(xy,axis=1)... | Traceback (most recent call last):
File "/tmp/tmpnbu2mim6/tmpev97di5h.py", line 29, in <module>
main()
File "/tmp/tmpnbu2mim6/tmpev97di5h.py", line 11, in main
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s620878090 | p02556 | u372802746 | 1600029288 | Python | Python (3.8.2) | py | Runtime Error | 34 | 11980 | 207 | N = int(input())
M=N*N
x = [0] * N
y = [0] * N
z=[0]*M
for i in range(0,N):
x[i], y[i] = map(int, input().split())
for i in range(0,M):
z.append(abs(x[i//N]-x[i%N])+abs(y[i//N]-y[i%N]))
print(max(z)) | Traceback (most recent call last):
File "/tmp/tmp_r_5jisl/tmpnqpxujir.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s753511117 | p02556 | u354804355 | 1600029270 | Python | Python (3.8.2) | py | Runtime Error | 610 | 66436 | 317 | #ABC178 E
import numpy as np
n = int(input())
l = [list(map(int, input().split())) for l in range(n)]
list = np.array(l)
#print(list)
all_diffs = np.expand_dims(list, axis=1) - np.expand_dims(list, axis=0)
#print(all_diffs)
distance = np.sum(abs(all_diffs), axis=-1)
#print(distance)
ans = np.max(distance)
print(ans) | Traceback (most recent call last):
File "/tmp/tmprpspuyqs/tmpq0_gqkc2.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s494678478 | p02556 | u785618718 | 1600029265 | Python | Python (3.8.2) | py | Runtime Error | 455 | 45516 | 424 | N = int(input())
xy = [ [0,0] ]*N
for i in range(N):
xy[i] = list( map(int, input().split()) )
max = 0
xy = list(set(xy))
for s in range(N-1):
for t in range(s+1,N):
manh = 0
x_d = xy[s][0] - xy[t][0]
y_d = xy[s][1] - xy[t][1]
if x_d > 0:
manh += x_d
else:
manh -= x_d
if y_d... | Traceback (most recent call last):
File "/tmp/tmpict1f050/tmpq8wux0ys.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s462855766 | p02556 | u273914730 | 1600029256 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9072 | 321 | N=int(input())
xy=[map(int,input().split()) for i in range(N)]
x,y=[list(j) for j in zip(*xy)]
m=0
t=0
for k in range(N):
for l in range(k,N-1):
if (abs(x[k]-x[l]))<t:
m=m
else:
if (abs(x[k]-x[l])+abs(y[k]-y[l]))>m:
t=(abs(x[k]-x[l])
m=(abs(x[k]-x[l])+abs(y[k]-y[l]))
print(m)... | File "/tmp/tmp2sw8xlfy/tmpxqcgb91g.py", line 13
t=(abs(x[k]-x[l])
^
SyntaxError: '(' was never closed
| |
s724625977 | p02556 | u019685451 | 1600029226 | Python | PyPy3 (7.3.0) | py | Runtime Error | 356 | 98060 | 1778 | def solve():
N = int(input())
xs, ys = [], []
for _ in range(N):
x, y = map(int, input().split())
xs.append(x)
ys.append(y)
T, B = max(ys), min(ys)
L, R = min(xs), max(xs)
# print(T, B, L, R)
if T == B:
return abs(R - L)
if L == R:
return ... | Traceback (most recent call last):
File "/tmp/tmp96t3z_ve/tmpf5yo9a_8.py", line 70, in <module>
print(solve())
^^^^^^^
File "/tmp/tmp96t3z_ve/tmpf5yo9a_8.py", line 2, in solve
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s162372599 | p02556 | u554129261 | 1600029222 | Python | Python (3.8.2) | py | Runtime Error | 468 | 9256 | 494 | N = int(input())
xpy_max = 0
xpy_min = 10 ** 9 + 3
xmy_max = 0
xmy_min = 10 ** 9 + 3
for i in range(N):
x, y = map(int, input().split())
if x + y <= xpy_min:
xpy_min = x + y
a = (x, y)
if x + y >= xpy_max:
xpy_max = x + y
b = (x, y)
if x - y >= xmy_max:
xmy_max = ... | Traceback (most recent call last):
File "/tmp/tmp7_b76y74/tmpqws975qc.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s246241025 | p02556 | u248996551 | 1600029218 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2207 | 97600 | 2173 | N=int(input())
X=[]
Y=[]
Z=[]
import sys
if N==2:
x_1,y_1=map(int,input().split())
x_2,y_2=map(int,input().split())
print(abs(x_1-x_2)+(y_1-y_2))
sys.exit()
for i in range(N):
x,y=map(int,input().split())
X.append(x)
Y.append(y)
if [x,y] not in Z:
Z.append([x,y])
#Z.a... | Traceback (most recent call last):
File "/tmp/tmphb7c5pbg/tmpbju7io15.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s259086770 | p02556 | u706414019 | 1600029208 | Python | PyPy3 (7.3.0) | py | Runtime Error | 88 | 68616 | 1306 | 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())
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>=... | File "/tmp/tmprlsay711/tmpgf7jzavk.py", line 65
print(max([XY01,XY02,XY03,XY12,XY13,XY23])
^
SyntaxError: '(' was never closed
| |
s907771114 | p02556 | u922769680 | 1600029195 | Python | Python (3.8.2) | py | Runtime Error | 653 | 76228 | 452 | n=int(input())
a_list=[list(map(int,input().split())) for i in range(n)]
import numpy as np
A=[]
for i in range(n):
A.append(a_list[i][0]**2+a_list[i][1]**2)
A2=np.array(A)
maxIndex = [i for i, x in enumerate(a) if x == max(a)]
minIndex = [i for i, x in enumerate(a) if x == min(a)]
B=[]
for i in range(len(maxIndex... | Traceback (most recent call last):
File "/tmp/tmptbfsu4q4/tmppog3rpd9.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s212488856 | p02556 | u706414019 | 1600029159 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 68612 | 1555 | 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())
XY.append([x,y])
xAve += x
yAve += y
xAve = xAve/N
yAve = yAve/N
XYnorm = [0]*4
for x,y ... | File "/tmp/tmp6idv18_t/tmpq3a16r0y.py", line 1
import sys,math,collections,itertools
IndentationError: unexpected indent
| |
s755946326 | p02556 | u699522269 | 1600029139 | Python | Python (3.8.2) | py | Runtime Error | 592 | 66548 | 289 | import numpy as np
N = int(input())
nums=[]
for _ in range(N):
nums.append(list(map(int,input().split())))
cities = np.array(nums)
all_diffs = np.expand_dims(cities, axis=1) - np.expand_dims(cities, axis=0)
degree_distance = np.sum(abs(all_diffs), axis=-1)
print(degree_distance.max()) | Traceback (most recent call last):
File "/tmp/tmparyiqpds/tmpk8whuruk.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s090944940 | p02556 | u822090837 | 1600029124 | Python | Python (3.8.2) | py | Runtime Error | 364 | 24696 | 242 | N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
x[i], y[i] = map(int, input().split())
0<=a<=N-1,0<=b<=N-1,a!=b
for a in range(N):
for b in range(N):
P=list(abs(x[a]-x[b])+abs(y[a]-y[b]))
l=sum(P)
print(P.count(l)) | Traceback (most recent call last):
File "/tmp/tmpxraxkava/tmpitutou45.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s924507499 | p02556 | u706414019 | 1600029107 | Python | PyPy3 (7.3.0) | py | Runtime Error | 198 | 95740 | 1307 | 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())
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>=... | Traceback (most recent call last):
File "/tmp/tmpkm26vzwv/tmpgwy9jhj6.py", line 4, in <module>
N=int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s379784265 | p02556 | u995323427 | 1600029074 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8944 | 382 | N = int(input())
hw = [[int(i) for i in input().split()] for _ i range(N)]
minD = 2*10**9
min = 0
maxD = 0
max = 0
for i in range(N):
if (minD > (hw[i][0] + hw[i][1])):
minD = hw[i][0] + hw[i][1]
min = i
if (maxD < hw[i][0] + hw[i][1]):
maxD = hw[i][0] + hw[i][1]
max = i
print... | File "/tmp/tmpevj8ybog/tmpv8g0pje1.py", line 2
hw = [[int(i) for i in input().split()] for _ i range(N)]
^^^^^^^^^^
SyntaxError: invalid syntax. Perhaps you forgot a comma?
| |
s959736247 | p02556 | u198930868 | 1600029059 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2211 | 164112 | 274 | n = int(input())
c = [list(map(int,input().split())) for i in range(n)]
c= list(map(list, set(map(tuple, c))))
ans = 0
if len(c) >= 2:
for i in range(n):
for l in range(i,n):
tmp = abs(c[i][0] - c[l][0]) + abs(c[i][1]-c[l][1])
ans = max(ans,tmp)
print(ans) | Traceback (most recent call last):
File "/tmp/tmpdi_77gi7/tmp7zlm8744.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s518332906 | p02556 | u469254913 | 1600029050 | Python | Python (3.8.2) | py | Runtime Error | 375 | 66476 | 469 | import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)
def main():
N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
xy = np.array(xy)
# print(xy)
diffs = np.expand_dims(xy,axis=1)... | Traceback (most recent call last):
File "/tmp/tmpmcw50gju/tmpndeom8sr.py", line 28, in <module>
main()
File "/tmp/tmpmcw50gju/tmpndeom8sr.py", line 11, in main
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s907868536 | p02556 | u623283955 | 1600029046 | Python | PyPy3 (7.3.0) | py | Runtime Error | 92 | 68720 | 197 | import numpy as np
n=int(input())
lx=[]
ly=[]
for i in range(n):
x,y=map(int,input().split())
lx.append(x+y)
ly.append(x-y)
ax,bx,ay,by=max(lx),min(lx),max(ly),min(ly)
print(max(ax-bx,ay-by)) | Traceback (most recent call last):
File "/tmp/tmp3wtj0xg4/tmp09ocz4jw.py", line 2, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s381792028 | p02556 | u923662841 | 1600029037 | Python | Python (3.8.2) | py | Runtime Error | 577 | 60092 | 320 | import numpy as np
N = int(input())
xy = list()
for i in range(N):
x,y = map(int,input().split())
xy.append([x,y])
XY = np.array(xy)
dif = np.expand_dims(XY,axis=1) - np.expand_dims(XY,axis=0)
dis = np.sum(np.abs(dif), axis=-1).astype(np.int64)
idx = np.unravel_index(np.argmax(dis),dis.shape)
print(dis[idx]) | Traceback (most recent call last):
File "/tmp/tmpgm1h_cv7/tmpl3cffy8h.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s646906088 | p02556 | u710282484 | 1600029035 | Python | Python (3.8.2) | py | Runtime Error | 442 | 69164 | 316 | n=int(input())
l=[input().split() for _ in range(n)]
dp=[0]*n*n
dp1=[0]*n*n
for i in range(n):
for j in range(1,n):
dp[i+j] = max(abs(int(l[i][0]) - int(l[j][0])), dp[i+j-1])
dp1[i+j] = max(abs(int(l[i][1]) - int(l[j][1])), dp[i+j-1])
dp=sorted(dp)
dp1=sorted(dp1)
print(int(dp[-1])+int(dp1[-1])) | Traceback (most recent call last):
File "/tmp/tmp4efipxbo/tmp2631lbzm.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s474732882 | p02556 | u224346910 | 1600029010 | Python | PyPy3 (7.3.0) | py | Runtime Error | 367 | 103944 | 585 | from itertools import combinations
N = int(input())
XY = [list(map(int, input().split())) for _ in range(N)]
min_diff = 10**9
max_diff = 1
min_sum = 2 * 10**9
max_sum = 2
for x,y in XY:
min_diff = min(x-y, min_x)
max_diff = max(x-y, max_x)
min_sum = min(x+y, min_sum)
max_sum = max(x+y, max_sum)
cand... | Traceback (most recent call last):
File "/tmp/tmpubu9ctij/tmps7yavrx3.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s420212020 | p02556 | u710282484 | 1600028998 | Python | PyPy3 (7.3.0) | py | Runtime Error | 387 | 120792 | 316 | n=int(input())
l=[input().split() for _ in range(n)]
dp=[0]*n*n
dp1=[0]*n*n
for i in range(n):
for j in range(1,n):
dp[i+j] = max(abs(int(l[i][0]) - int(l[j][0])), dp[i+j-1])
dp1[i+j] = max(abs(int(l[i][1]) - int(l[j][1])), dp[i+j-1])
dp=sorted(dp)
dp1=sorted(dp1)
print(int(dp[-1])+int(dp1[-1])) | Traceback (most recent call last):
File "/tmp/tmpiyb8zz5q/tmphx_7b0zd.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s319262934 | p02556 | u710282484 | 1600028947 | Python | PyPy3 (7.3.0) | py | Runtime Error | 404 | 124748 | 306 | n=int(input())
l=[input().split() for _ in range(n)]
dp=[0]*n*n
dp1=[0]*n*n
for i in range(n):
for j in range(1,n):
dp[i+j] = max(abs(int(l[i][0]) - int(l[j][0])), dp[i+j-1])
dp1[i+j] = max(abs(int(l[i][1]) - int(l[j][1])), dp[i+j-1])
dp=sorted(dp)
dp1=sorted(dp1)
print(dp[-1]+dp1[-1]) | Traceback (most recent call last):
File "/tmp/tmpkmr1t1ix/tmpt42r_z8i.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s421478022 | p02556 | u580073714 | 1600028934 | Python | Python (3.8.2) | py | Runtime Error | 598 | 66256 | 283 | import numpy as np
N = int(input())
a = [[0] *2] * N
for i in range(N):
a[i] = list(map(int, input().split()))
cities = np.array(a)
all_diffs = np.expand_dims(cities, axis=1) - np.expand_dims(cities, axis=0)
distance = np.sum(np.abs(all_diffs), axis=-1)
print(np.max(distance)) | Traceback (most recent call last):
File "/tmp/tmp93i9old9/tmpakf7h9kc.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s580383230 | p02556 | u926266624 | 1600028921 | Python | Python (3.8.2) | py | Runtime Error | 1119 | 77304 | 362 | N = int(input())
ListN = [[0 for i in range(2)] for j in range(N)]
for i in range (N):
x, y, = map(int, input().split())
ListN[i] = [x,y]
ListN = list(map(list, set(map(tuple, ListN))))
ListN.sort(reverse=True)
m = 0
minN = ListN[0][0] + ListN[0][1]
maxN = ListN[0][0] + ListN[0][1]
print((ListN[0][0] - ListN[0]... | Traceback (most recent call last):
File "/tmp/tmpquz4kr19/tmphvw7_n1p.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s543903712 | p02556 | u248996551 | 1600028898 | Python | PyPy3 (7.3.0) | py | Runtime Error | 2209 | 139156 | 1963 | N=int(input())
X=[]
Y=[]
Z=[]
for i in range(N):
x,y=map(int,input().split())
X.append(x)
Y.append(y)
Z.append([x,y])
def signed_area(p1, p2, p3):
'''符号付き面積を計算 '''
area = (((p2[0] - p1[0]) * (p3[1] - p1[1])) - ((p3[0] - p1[0]) * (p2[1] - p1[1]))) / 2
return area
def convex_hull(p_list)... | Traceback (most recent call last):
File "/tmp/tmpr5v5181l/tmpposoin2o.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s424693283 | p02556 | u926266624 | 1600028874 | Python | Python (3.8.2) | py | Runtime Error | 1073 | 77184 | 360 | N = int(input())
ListN = [[0 for i in range(2)] for j in range(N)]
for i in range (N):
x, y, = map(int, input().split())
ListN[i] = [x,y]
ListN = list(map(list, set(map(tuple, ListN))))
ListN.sort(reverse=True)
m = 0
minN = ListN[0][0] + ListN[0][1]
maxN = ListN[0][0] + ListN[0][1]
print(ListN[0][0] - ListN[0][... | Traceback (most recent call last):
File "/tmp/tmpip2o_sw0/tmp15xesjz_.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s817243668 | p02556 | u476628920 | 1600028869 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 45408 | 239 | N = int(input())
XY = []
for i in range(N):
val = input()
if val:
XY.append(val)
V=[]
c = 0
for i in range(N):
for j in range(i+1,N):
V.append(abs(int(XY[i][0])-int(XY[j][0]))+abs(int(XY[i][2])-int(XY[j][2])))
print(max(V)) | Traceback (most recent call last):
File "/tmp/tmpewdkz0nj/tmpyd9qf0_z.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s494603742 | p02556 | u662977802 | 1600028859 | Python | Python (3.8.2) | py | Runtime Error | 431 | 9228 | 602 | n = int(input())
c = 0
xx = 0
yy = 0
for i in range(n):
p = input()
q = p.split(" ")
x = int(q[0])
y = int(q[1])
k = i + 1
for j in range(k, n):
m = input()
l = m.split(" ")
a = int(l[0])
b = int(l[1])
if x >= a and y >= b:
if (x - a) + (y - b) > (xx + yy):
... | Traceback (most recent call last):
File "/tmp/tmplreizdax/tmprvk7a7dz.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s587404745 | p02556 | u822090837 | 1600028832 | Python | Python (3.8.2) | py | Runtime Error | 378 | 24684 | 246 | N = int(input())
x = [0] * N
y = [0] * N
for i in range(N):
x[i], y[i] = map(int, input().split())
1<=a<=N,1<=b<=N,a!=b
for a in range(1,N+1):
for b in range(1,N+1):
P=list(abs(x[a]-x[b])+abs(y[a]-y[b]))
l=sum(P)
print(P.count(l)) | Traceback (most recent call last):
File "/tmp/tmpnji5b8m8/tmpo0ud4fx4.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s861427200 | p02556 | u580073714 | 1600028794 | Python | Python (3.8.2) | py | Runtime Error | 614 | 66384 | 392 | import numpy as np
N = int(input())
a = [[0] *2] * N
for i in range(N):
a[i] = list(map(int, input().split()))
#print(a)
cities = np.array(a)
all_diffs = np.expand_dims(cities, axis=1) - np.expand_dims(cities, axis=0)
#print(all_diffs)
degree_distance = np.sum(np.abs(all_diffs), axis=-1)
#print(degree_distance... | Traceback (most recent call last):
File "/tmp/tmpaqg6o2lp/tmponw_35ti.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s404816441 | p02556 | u884244819 | 1600028740 | Python | Python (3.8.2) | py | Runtime Error | 664 | 77660 | 334 | import numpy as np
from scipy.spatial import distance
def main():
n = int(input())
lis = []
for i in range(n):
x,y = map(int, input().split())
lis.append([x,y])
M = np.array(lis)
dist_M = distance.cdist(M, M, metric='cityblock')
print(int(np.max(dist_M)))
if __name__ == '__main_... | Traceback (most recent call last):
File "/tmp/tmpk5hyqmxe/tmp_d50bslv.py", line 14, in <module>
main()
File "/tmp/tmpk5hyqmxe/tmp_d50bslv.py", line 4, in main
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s842713338 | p02556 | u245375581 | 1600028735 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8932 | 396 | import numpy as np
from numba import njit
N = int(input())
x=[0]*N
y=[0]*N
add=[0]*N
for i in range(N):
xy=list(map(int,input().split()))
x[i]=xy[0]
y[i]=xy[1]
add=x[i]+y[i]
@njit
def solve(N, x, y, add):
temp=np.array(add)
index_list=np.argsort(temp)
return int(abs(x[index_list[0]-x[index... | File "/tmp/tmpmycqmhs7/tmpuifv_by3.py", line 18
return int(abs(x[index_list[0]-x[index_list[N-1])+abs(y[index_list[0]-y[index_list[N-1]))
^
SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
| |
s177399500 | p02556 | u699522269 | 1600028734 | Python | Python (3.8.2) | py | Runtime Error | 617 | 66048 | 320 | import numpy as np
import sys
N = int(input())
mx = - float("inf")
nums=[]
for _ in range(N):
nums.append(list(map(int,input().split())))
cities = np.array(nums)
all_diffs = np.expand_dims(cities, axis=1) - np.expand_dims(cities, axis=0)
degree_distance = np.sum(abs(all_diffs), axis=-1)
print(degree_distance.max()) | Traceback (most recent call last):
File "/tmp/tmp6myae32o/tmpe7dp3wt8.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s087108870 | p02556 | u699522269 | 1600028707 | Python | PyPy3 (7.3.0) | py | Runtime Error | 370 | 88184 | 320 | import numpy as np
import sys
N = int(input())
mx = - float("inf")
nums=[]
for _ in range(N):
nums.append(list(map(int,input().split())))
cities = np.array(nums)
all_diffs = np.expand_dims(cities, axis=1) - np.expand_dims(cities, axis=0)
degree_distance = np.sum(abs(all_diffs), axis=-1)
print(degree_distance.max()) | Traceback (most recent call last):
File "/tmp/tmp05k97z1x/tmpfikrju59.py", line 3, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s312190417 | p02556 | u706414019 | 1600028675 | Python | PyPy3 (7.3.0) | py | Runtime Error | 224 | 95756 | 925 | 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())
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>=... | Traceback (most recent call last):
File "/tmp/tmpb5pht_ev/tmpj_c4htub.py", line 4, in <module>
N=int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s554957765 | p02556 | u102655885 | 1600028649 | Python | Python (3.8.2) | py | Runtime Error | 705 | 9288 | 1544 | n = int(input())
edge0 = list(map(lambda x: int(x), input().split()))
edge1 = list(map(lambda x: int(x), input().split()))
dis = abs(edge0[0]-edge1[0]) + abs(edge0[1]-edge1[1])
for _ in range(n-2):
x, y = map(lambda x: int(x), input().split())
if (x < min(edge0[0], edge1[0])) | (max(edge0[0], edge1[0]) < x) |... | Traceback (most recent call last):
File "/tmp/tmpgvzyxpwc/tmprmj5tpff.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s499356434 | p02556 | u597252152 | 1600028641 | Python | Python (3.8.2) | py | Runtime Error | 28 | 8956 | 1038 | #include "bits/stdc++.h"
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
using namespace std;
#define fastio ios_base::sync_with_stdio(0); cin.tie(0);
#define int long long int
#define tc int t; cin>>t; while(t--)
#define fora(i,n) for(int i=0;i<n;i++)
#defi... | File "/tmp/tmpl46nadp5/tmp6gunh77o.py", line 2
//#include<ext/pb_ds/assoc_container.hpp>
^^
SyntaxError: invalid syntax
| |
s294163017 | p02556 | u966542724 | 1600028626 | Python | Python (3.8.2) | py | Runtime Error | 761 | 49828 | 813 | n = int(input())
c = []
for _ in range(n):
c.append(list(map(int,input().split())))
ans = 0
a = 100000000000000
m = 0
lm = 0
rm = 0
lt = []
rt = []
lb = []
rb = []
for l in c:
m = max(m,l[0]+l[1])
a = min(a,l[0]+l[1])
if l[0] > l[1]:
rm = max(rm,l[0]-l[1])
if l[0] < l[1]:
lm = ma... | Traceback (most recent call last):
File "/tmp/tmporve_r1d/tmpnbh0gme4.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s383533275 | p02556 | u739843002 | 1600028622 | Python | Python (3.8.2) | py | Runtime Error | 2215 | 276824 | 602 | def main():
N = int(input())
p = []
for i in range(N):
x, y = [int(a) for a in input().split(" ")]
p.append({"x" : x, "y" : y})
aveX = 0
aveY = 0
for i in range(N):
aveX += p[i]["x"]
aveY += p[i]["y"]
aveX /= N
aveY /= N
for i in range(N):
p[i]["d"] = abs(aveX - p[i]["x"]) + abs(aveY - p[i]["y"])
p.... | Traceback (most recent call last):
File "/tmp/tmpm1nudykb/tmpef1v9t5t.py", line 28, in <module>
main()
File "/tmp/tmpm1nudykb/tmpef1v9t5t.py", line 2, in main
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s845683438 | p02556 | u923662841 | 1600028569 | Python | Python (3.8.2) | py | Runtime Error | 615 | 60016 | 339 | import numpy as np
N = int(input())
xy = list()
for i in range(N):
x,y = map(int,input().split())
xy.append([x,y])
XY = np.array(xy)
dif = np.expand_dims(XY,axis=1) - np.expand_dims(XY,axis=0)
dis = np.sum(np.abs(dif), axis=-1)
idx = np.unravel_index(np.argmax(dis),dis.shape)
#print(dif)
#print(dis)
#print(i... | Traceback (most recent call last):
File "/tmp/tmpgmnbz1ez/tmpwdr8ndy7.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s971948369 | p02556 | u095424182 | 1600028519 | Python | Python (3.8.2) | py | Runtime Error | 410 | 42252 | 485 | import math
def dist(a,b):
return abs(a[0]-b[0])+abs(a[1]-b[1])
if __name__=="__main__":
n=int(input())
l=[]
for _ in range(n):
x=[int(i) for i in input().split()]
l.append(x)
if len(l)==1:
print(0)
exit
n=len(l)
ans=[]
for i in range(n-1):
l=i+1
r=len(l)
ma=-1
while(i<... | Traceback (most recent call last):
File "/tmp/tmpdx5kc4z3/tmplr15nu7x.py", line 7, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s610091363 | p02556 | u304590784 | 1600028518 | Python | Python (3.8.2) | py | Runtime Error | 2208 | 116740 | 686 | N = int(input())
xy = [map(int, input().split()) for s in range(N)]
x, y = [list(i) for i in zip(*xy)]
if max(x) == min(x):
ans = abs(max(y) - min(y))
elif max(y) == min(y):
ans = abs(max(x) -min(x))
else:
list = []
l_a = [i for i, j in enumerate(x) if j == max(x)]
l_b = [i for i, j in enumerate(x... | Traceback (most recent call last):
File "/tmp/tmpi9d6kuwz/tmpu8xpi187.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s366189554 | p02556 | u879921371 | 1600028488 | Python | Python (3.8.2) | py | Runtime Error | 686 | 48100 | 1269 | from math import sqrt
from functools import reduce
def convex_hull_graham(points):
TURN_LEFT, TURN_RIGHT, TURN_NONE = (1, -1, 0)
# def cmp(a, b):
# return (a > b) - (a < b)
def turn(p, q, r):
a=(q[0] - p[0])*(r[1] - p[1]) - (r[0] - p[0])*(q[1] - p[1])
(a > b) - (a < b)
def _keep_left(hull, r):
w... | Traceback (most recent call last):
File "/tmp/tmpf9rclj9t/tmp3ht4almb.py", line 41, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s774466355 | p02556 | u543016260 | 1600028462 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8992 | 9 | 2
1 1
1 1 | File "/tmp/tmp_2w2zuk2/tmpjwf1k3sf.py", line 2
1 1
^
SyntaxError: invalid syntax
| |
s002583287 | p02556 | u408325839 | 1600028454 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9040 | 176 | 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)
| Traceback (most recent call last):
File "/tmp/tmpdzycb2x2/tmpewvkeo8x.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s006211452 | p02556 | u354804355 | 1600028420 | Python | Python (3.8.2) | py | Runtime Error | 593 | 66520 | 307 | #ABC178 E
import numpy as np
n = int(input())
l = [list(map(int, input().split())) for l in range(n)]
list = np.array(l)
#print(list)
all_diffs = np.expand_dims(list, axis=1) - np.expand_dims(list, axis=0)
#print(all_diffs)
distance = np.sum(abs(all_diffs), axis=-1)
#print(distance)
print(np.max(distance)) | Traceback (most recent call last):
File "/tmp/tmp9z22otv_/tmp5h61v2ud.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s101810856 | p02556 | u068862829 | 1600028375 | Python | Python (3.8.2) | py | Runtime Error | 425 | 9248 | 529 | N = int(input())
x1, y1 = map(int, input().split())
x2, y2 = map(int, input().split())
if x1+y1 > x2+y2:
xmax = x1+y1
xmin = x2+y2
else:
max1 = x2+y2
min1 = x1+y1
if x1-y1 > x2-y2:
max2 = x1-y1
min2 = x2-y2
else:
max2 = x2-y2
min2 = x1-y1
for i in range(N-2):
x, y = map(int, input(... | Traceback (most recent call last):
File "/tmp/tmp33q62ush/tmpd6cg9uqy.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s521206177 | p02556 | u411923565 | 1600028360 | Python | Python (3.8.2) | py | Runtime Error | 417 | 32864 | 331 | import bisect
N = int(input())
X = []
Y = []
for _ in range(N):
x,y = map(int,input().split())
X.append(x)
Y.append(y)
sumxy = [x+y for x,y in zip(X,Y)]
maxidx = bisect.bisect_left(sumxy,max(sumxy))
minidx = bisect.bisect_left(sumxy,min(sumxy))
ans = abs(X[maxidx] - X[minidx]) + abs(Y[maxidx] - Y[minidx])... | Traceback (most recent call last):
File "/tmp/tmpvgtbvqvt/tmp372xnb6p.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s889840005 | p02556 | u770293614 | 1600028352 | Python | Python (3.8.2) | py | Runtime Error | 660 | 96268 | 230 | N=int(input())
arr=[]
for i in range(N):
arr.append((map(int,input().split(' '))))
most=0
for j in range(len(arr)):
for k in range(i,len(arr)):
x1,y1,x2,y2=arr[j],arr[k]
most=max(most,(abs(x1-x2)+abs(y1-y2)))
print(most)
| Traceback (most recent call last):
File "/tmp/tmpzyhvktce/tmpry3oi27k.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s488331960 | p02556 | u367319568 | 1600028337 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8960 | 355 | N = int(input())
Xmax = -2*10**9
Ymax = -2*10**9
Xmin = 2*10**9
Ymin = 2*10**9
for i in range(N):
x, y = map(int, input().split())
if (x + y >= Xmax):
Xmax = x + y
if (x + y =< Xmin):
Xmin = x + y
if (x - y >= Ymax):
Ymax = x - y
if (x - y =< Ymin):
Ymin = x - y
p... | File "/tmp/tmprxweygvb/tmp41e2sdwf.py", line 13
if (x + y =< Xmin):
^
SyntaxError: invalid syntax
| |
s777515228 | p02556 | u770293614 | 1600028306 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9188 | 229 |
N=int(input())
arr=[]
for i in range():
arr.append((map(int,input().split(' '))))
most=0
for j in range(len(arr)):
for k in range(i,len(arr)):
x1,y1,x2,y2=arr[j],arr[k]
most=max(most,(abs(x1-x2)+abs(y1-y2)))
print(most) | Traceback (most recent call last):
File "/tmp/tmpu0wbrn_g/tmp2vg6x7io.py", line 3, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s003212312 | p02556 | u060793972 | 1600028242 | Python | PyPy3 (7.3.0) | py | Runtime Error | 338 | 88752 | 302 | n=int(input())
l1=[]
l2=[]
for i in range(n):
a,b=map(int,input().split())
if a==b:
l1.append(a+b)
l2.append(a+b)
elif a>b:
l1.append(a+b)
else:
l2.append(a+b)
l1.sort()
l2.sort()
a,b,c,d=l1[0],l1[-1],l2[0],l2[-1]
print(abs(max(a-c,a-d,b-c,b-d,key=abs))) | Traceback (most recent call last):
File "/tmp/tmpvl2uca8h/tmp6hxpbekh.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s776609790 | p02556 | u770293614 | 1600028238 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8936 | 291 | def mahattan([x1,y1],[x2,y2]):
return (abs(x1-x2)+abs(y1-y2))
N=int(input())
arr=[]
for i in range():
arr.append((map(int,input().split(' '))))
most=0
for j in range(len(arr)):
for k in range(i,len(arr)):
x1,y1,x2,y2=arr[j],arr[k]
most=max(most,mahattan(arr[j],arr[k]))
print(most) | File "/tmp/tmpbjwm0ahk/tmpep8vq3ym.py", line 1
def mahattan([x1,y1],[x2,y2]):
^
SyntaxError: invalid syntax
| |
s545504837 | p02556 | u926266624 | 1600028204 | Python | Python (3.8.2) | py | Runtime Error | 27 | 8944 | 625 | N = int(input())
ListN = [[0 for i in range(2)] for j in range(N)]
for i in range (N):
x, y, = map(int, input().split())
ListN[i] = [x,y]
m = 0
minN = ListN[0][0] + ListN[0][1]
maxN = ListN[0][0] + ListN[0][1]
for i in range (len(ListN)-1):
flg = False
if minN >= ListN[i][0] + ListN[i]... | File "/tmp/tmpsor_1zln/tmpclw08z8o.py", line 1
N = int(input())
IndentationError: unexpected indent
| |
s695521062 | p02556 | u989074104 | 1600028190 | Python | Python (3.8.2) | py | Runtime Error | 4532 | 225636 | 593 | s=int(input())
li=[]
row=[]
col=[]
for i in range(s):
x,y = map(int,input().split())
row.append(x)
col.append(y)
li.append([x,y])
row.sort()
col.sort()
print(li)
def max_seek(row,col,li):
print("row",row)
if (([row[-1],col[-1]] in li) and ([row[0],low[0]] in li)) or (([row[0],col[-1]] in li) and ([row[-... | Traceback (most recent call last):
File "/tmp/tmpju4q_pkt/tmp_qwdqkqx.py", line 1, in <module>
s=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s218322420 | p02556 | u923662841 | 1600028164 | Python | Python (3.8.2) | py | Runtime Error | 625 | 59864 | 319 | import numpy as np
N = int(input())
xy = list()
for i in range(N):
x,y = map(int,input().split())
xy.append([x,y])
XY = np.array(xy)
dif = np.expand_dims(XY,axis=1) - np.expand_dims(XY,axis=0)
dis = np.sum(dif, axis=-1)
idx = np.unravel_index(np.argmax(dis),dis.shape)
#print(dis)
#print(idx)
print(dis[idx]) | Traceback (most recent call last):
File "/tmp/tmpf2432aeb/tmpy9l5cmzl.py", line 2, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s684889332 | p02556 | u327498205 | 1600028121 | Python | PyPy2 (7.3.0) | py | Runtime Error | 87 | 64396 | 235 | N = int(input())
X = [list(map(int, input().split())) for i in range(N)]
M = 0
for i in range(N):
for l in range(i):
temp = abs(X[i][0] - X[l][0]) + abs(X[i][1] - X[l][1])
if M <= temp:
M = temp
print(M) | Traceback (most recent call last):
File "/tmp/tmp9yi123r4/tmpdyfdp8dt.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s198552716 | p02556 | u770293614 | 1600028109 | Python | Python (3.8.2) | py | Runtime Error | 32 | 8992 | 265 | def mahattan([x1,y1],[x2,y2]):
return (abs(x1-x2)+abs(y1-y2))
N=int(input())
arr=[]
for i in range():
arr.append([map(int,input().split(' '))])
most=0
for j in range(len(arr)):
for k in range(i,len(arr)):
most=max(most,mahattan(arr[j],arr[k]))
print(most)
| File "/tmp/tmpu48ycm0s/tmpdh0cf4cy.py", line 1
def mahattan([x1,y1],[x2,y2]):
^
SyntaxError: invalid syntax
| |
s620065325 | p02556 | u163971674 | 1600028024 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 76980 | 305 | n=int(input())
x=[]
for i in range(n):
a,b=map(int,input().split(" "))
x.append([a,b])
x=list(map(list, set(map(tuple, x))))
if len(x)==1:
print(0)
else:
ans=0
for i in range(n):
for j in range(n):
y=abs(x[i][0]-x[j][0])+abs(x[i][1]-x[j][1])
if ans<y:
ans=y
print(ans) | Traceback (most recent call last):
File "/tmp/tmpivomofs9/tmps9zsonsp.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s619960712 | p02556 | u273914730 | 1600028020 | Python | Python (3.8.2) | py | Runtime Error | 869 | 113540 | 255 | N=int(input())
xy=[map(int,input().split()) for _ in range(N)]
x,y=[list(j) for j in zip(xy)]
m=0
for k in range(0,len(x)-1):
for l in range(k,len(y)):
if abs(x[k]-x[l])+abs(y[k]-y[l])>m:
m=abs(x[k]-x[l])+abs(y[k]-y[l])
print(m)
| Traceback (most recent call last):
File "/tmp/tmpr2a4vnpq/tmpb2xkcuh7.py", line 1, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s820615983 | p02556 | u398511319 | 1600027965 | Python | Python (3.8.2) | py | Runtime Error | 414 | 80844 | 304 | import numpy as np
import sys
dins=sys.stdin.readlines()
data=np.array([ [ int(r) for r in ln.split(' ') if r != '' ] for ln in dins[1:]])
d0=data
d1=data
dists=[]
while d0.shape[0] > 0:
d0=d0[1:]
d1=d1[:-1]
dists=np.concatenate([dists,abs(x[i]-x[j])+abs(y[i]-y[j])])
print(dists.max()) | Traceback (most recent call last):
File "/tmp/tmppptdj_6b/tmpuclbqizj.py", line 15, in <module>
print(dists.max())
^^^^^^^^^
AttributeError: 'list' object has no attribute 'max'
| |
s770686193 | p02556 | u933929042 | 1600027956 | Python | PyPy3 (7.3.0) | py | Runtime Error | 98 | 74744 | 628 | import numpy as np
def dist(d1, d2):
return abs(d1[0]-d2[0]) + abs(d1[1]-d2[1])
n = int(input())
list1 = np.zeros((n))
list2 = np.zeros((n))
xy_list = []
for i in range(n):
x, y = map(int, input().split())
xy_list.append([x, y])
list1[i] = x+y
list2[i] = x-y
num = np.zeros((4), dtype=int)
num[0] ... | Traceback (most recent call last):
File "/tmp/tmpz4qbws6n/tmpsix9fakc.py", line 6, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s482618352 | p02556 | u372802746 | 1600027946 | Python | Python (3.8.2) | py | Runtime Error | 34 | 12048 | 223 | N = int(input())
x = [0] * N
y = [0] * N
z = [0] * (N*N)
for i in range(N):
x[i], y[i] = map(int, input().split())
for i in range(0,(int((1/2)*N*(N+1)-1))):
z[i]=abs(x[i//N]-x[i%N])+abs(y[i//N]-y[i%N])
print(max(z)) | Traceback (most recent call last):
File "/tmp/tmp90un5xjx/tmphll272yg.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s291469326 | p02556 | u245375581 | 1600027833 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9068 | 610 | import sys
#def input():
#return sys.stdin.readline()[:-1]
import numpy as np
N = int(input())
x=[0]*N
y=[0]*N
add=[0]*N
for i in range(N):
xy=list(map(int,input().split()))
x[i]=xy[0]
y[i]=xy[1]
add=x[i]+y[i]
add=np.array(add)
index_list=np.argsort(add)
print(int(abs(x[index_list[0]-x[index_list[N-... | File "/tmp/tmpvad9vn7d/tmp6689zade.py", line 16
print(int(abs(x[index_list[0]-x[index_list[N-1])+abs(y[index_list[0]-y[index_list[N-1])))
^
SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
| |
s705713202 | p02556 | u245375581 | 1600027791 | Python | PyPy3 (7.3.0) | py | Runtime Error | 89 | 74548 | 610 | import sys
#def input():
#return sys.stdin.readline()[:-1]
import numpy as np
N = int(input())
x=[0]*N
y=[0]*N
add=[0]*N
for i in range(N):
xy=list(map(int,input().split()))
x[i]=xy[0]
y[i]=xy[1]
add=x[i]+y[i]
add=np.array(add)
index_list=np.argsort(add)
print(int(abs(x[index_list[0]-x[index_list[N-... | File "/tmp/tmpws7y2o5y/tmpiucnjbps.py", line 16
print(int(abs(x[index_list[0]-x[index_list[N-1])+abs(y[index_list[0]-y[index_list[N-1])))
^
SyntaxError: closing parenthesis ')' does not match opening parenthesis '['
| |
s900516923 | p02556 | u260204064 | 1600027791 | Python | Python (3.8.2) | py | Runtime Error | 379 | 9144 | 259 | n = int(input())
min = 10000000000
max = -10000000000
for _ in range(n):
x, y = map(int,input().split())
if x+y < min:
l = [x,y]
min = x+y
elif x+y > max:
r = [x,y]
max = x+y
print(abs(l[0]-r[0]) + abs(r[1]-l[1])) | Traceback (most recent call last):
File "/tmp/tmps69975jq/tmp1sose084.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s610544705 | p02556 | u813297429 | 1600027732 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9124 | 366 | n = int(input())
a = list(map(int,input().split()))
b = list(map(int,input().split()))
if n%2==0:
mid = n//2-1
else:
mid = n//2
if sorted(list(set(b)))==sorted(list(set(a))):
if b[mid+1:] + b[:mid+1] != a:
print('Yes')
print(" ".join(map(str,b[mid+1:] + b[:mid+1])))
else:
print(... | File "/tmp/tmpavp7y9ff/tmppf8laqbd.py", line 14
break
^^^^^
SyntaxError: 'break' outside loop
| |
s728981931 | p02556 | u469254913 | 1600027667 | Python | Python (3.8.2) | py | Runtime Error | 370 | 66544 | 420 | import numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)
def main():
N = int(input())
xy = [list(map(int,input().split())) for i in range(N)]
xy = np.array(xy)
diffs = np.expand_dims(xy,axis=1) - np.expand_dim... | Traceback (most recent call last):
File "/tmp/tmp3bujonxs/tmph2kk8dzp.py", line 24, in <module>
main()
File "/tmp/tmp3bujonxs/tmph2kk8dzp.py", line 11, in main
N = int(input())
^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: ''
| |
s994517292 | p02556 | u273914730 | 1600027652 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8704 | 254 | N=int(input())
xy=[map(int,input().split()) for _ in range(N)]
x,y=[list(j) for j in zip(xy)]
m=0
for k in range(0,len(x)-1):
for l in range(k,len(y))
if abs(x[k]-x[l])+abs(y[k]-y[l])>m:
m=abs(x[k]-x[l])+abs(y[k]-y[l])
print(m)
| File "/tmp/tmpbw8dp1ht/tmpcii7nlm0.py", line 7
for l in range(k,len(y))
^
SyntaxError: expected ':'
| |
s175870189 | p02556 | u273914730 | 1600027602 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8936 | 255 | N=int(input())
xy=[map(int,input().split()) for _ in range(N)]
x,y=[list(j) for j in zip(*xy)]
m=0
for k in range(0,len(x)-1):
for l in range(k,len(y))
if abs(x[k]-x[l])+abs(y[k]-y[l])>m:
m=abs(x[k]-x[l])+abs(y[k]-y[l])
print(m)
| File "/tmp/tmpnlb57uzx/tmppmwxhm_g.py", line 7
for l in range(k,len(y))
^
SyntaxError: expected ':'
| |
s411393001 | p02556 | u095424182 | 1600027506 | Python | Python (3.8.2) | py | Runtime Error | 648 | 78868 | 399 | def dist(a,b):
return sqrt((a[0]-b[0])**2+(a[1]-b[1])**2)
import numpy as np
if __name__=="__main__":
n=int(input())
l=[]
for _ in range(n):
l.append([int(i) for i in input().split()])
l=list(np.unique(np.array(l)))
l.sort()
if len(l)==1:
print(0)
exit
n=len(l)
ans=[]
for i in range(n):
... | Traceback (most recent call last):
File "/tmp/tmpliz7ila7/tmp2jthxl8u.py", line 5, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s276897051 | p02556 | u244416763 | 1600027330 | Python | Python (3.8.2) | py | Runtime Error | 662 | 54780 | 359 | n = int(input())
x = [0 for _ in range(n)]
for i in range(n):
x[i] = list(map(int, input().split()))
xx = sum([i[0] for i in x])/n
yy = sum([i[1] for i in x])/n
for i in x:
i.append(abs(xx-i[0]) + abs(yy-i[1]))
x.sort(key = lambda s:s[2])
ans = 0
for i in range(1, min(6, n)):
ans = max(ans, abs(x[-i][0] - i... | Traceback (most recent call last):
File "/tmp/tmp6ix0w3sm/tmp__3g9cge.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s148742468 | p02556 | u633467553 | 1600027326 | Python | Python (3.8.2) | py | Runtime Error | 404 | 25000 | 855 | n = int(input())
xlis = [0]
ylis = [0]
for _ in range(n):
x, y = map(int, input().split())
xlis.append(x)
ylis.append(y)
if (xlis[2]-xlis[1]) + (ylis[2]-ylis[1]) >= 0:
defa1 = 1
defa2 = 2
elif (xlis[2]-xlis[1]) + (ylis[2]-ylis[1]) <= 0:
defa1 = 2
defa2 = 1
def checkplace(defalt1, defalt2, n... | Traceback (most recent call last):
File "/tmp/tmpl1w7z2bn/tmpl7yp9exj.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s500024424 | p02556 | u665452497 | 1600027145 | Python | Python (3.8.2) | py | Runtime Error | 568 | 66556 | 241 | import numpy as np
N=int(input())
cities = np.array([list(map(int,input().split())) for _ in range(N)])
all_diffs = np.expand_dims(cities, axis=1) - np.expand_dims(cities, axis=0)
dist = np.sum(np.abs(all_diffs), axis=-1)
print(np.max(dist)) | Traceback (most recent call last):
File "/tmp/tmp2_fxy0dm/tmpyx8e8hk_.py", line 2, in <module>
N=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s877428489 | p02556 | u476628920 | 1600027092 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 26696 | 234 | N = int(input())
XY = []
for i in range(N):
val = input()
if val:
XY.append(val)
c = 0
for i in range(N):
for j in range(i+1,N):
c = max(c,abs(int(XY[i][0])-int(XY[j][0]))+abs(int(XY[i][2])-int(XY[j][0])))
print(c) | Traceback (most recent call last):
File "/tmp/tmpyinz_nyy/tmpk5qxlm2r.py", line 1, in <module>
N = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s590681446 | p02556 | u904331908 | 1600027032 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9052 | 13 | 3
1 1
2 4
3 2 | File "/tmp/tmpcg9p3n3v/tmp5bvtc5i0.py", line 2
1 1
^
SyntaxError: invalid syntax
| |
s719374606 | p02556 | u012771396 | 1600026883 | Python | PyPy3 (7.3.0) | py | Runtime Error | 185 | 96068 | 2917 | """
こんにちは。これはクシャルです
Author : thekushalghosh (クシャル)
Team : CodeDiggers
I prefer Python language over the C++ language :p :D
Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time
start_time = time.time()
###########################################################... | Traceback (most recent call last):
File "/tmp/tmpb62jvjc3/tmpdso3btop.py", line 112, in <module>
main()
File "/tmp/tmpb62jvjc3/tmpdso3btop.py", line 49, in main
solve()
File "/tmp/tmpb62jvjc3/tmpdso3btop.py", line 17, in solve
n = inp()
^^^^^
File "/tmp/tmpb62jvjc3/tmpdso3btop.py", line 56, ... | |
s769821205 | p02556 | u273914730 | 1600026801 | Python | Python (3.8.2) | py | Runtime Error | 29 | 8964 | 236 | xy=[map(int,input().split()) for i in range(0,N-1)]
x,y=[list(j) for j in zip(*xy)]
m=0
for k in range(0,N-2):
for l in range(k,N-1)
if abs(x[k]-x[l])+abs(y[k]-y[l])>m:
m=abs(x[k]-x[l])+abs(y[k]-y[l])
print(m)
| File "/tmp/tmpre_nxzop/tmpu06122re.py", line 6
for l in range(k,N-1)
^
SyntaxError: expected ':'
| |
s316283824 | p02556 | u273914730 | 1600026772 | Python | Python (3.8.2) | py | Runtime Error | 26 | 8976 | 226 | xy=[map(int,input().split()) for i in range(0,N-1)]
x,y=[list(j) for j in zip(*xy)]
m=0
for k in range(0,N-2):
for l in range(k,N-1)
if abs(x[k]-x[l])+abs(y[k]-y[l])>m:
m=abs(x[k]-x[l])+abs(y[k]-y[l])
print(m) | File "/tmp/tmpqsnob3ge/tmpw10n8rfy.py", line 6
for l in range(k,N-1)
^
SyntaxError: expected ':'
| |
s549906838 | p02556 | u091051505 | 1600026764 | Python | Python (3.8.2) | py | Runtime Error | 2207 | 40740 | 1849 | def signed_area(p1, p2, p3):
'''符号付き面積を計算 '''
area = (((p2[0] - p1[0]) * (p3[1] - p1[1])) - ((p3[0] - p1[0]) * (p2[1] - p1[1]))) / 2
return area
def convex_hull(p_list):
'''グラハムの凸包走査 '''
p_sort = []
for i in p_list:
p_sort.append(i[0])
# x座標が最小のものをリストの先頭に配置。
min_index = p_so... | Traceback (most recent call last):
File "/tmp/tmpcat42hs0/tmpya2q081r.py", line 60, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s503402321 | p02556 | u205116974 | 1600026644 | Python | Python (3.8.2) | py | Runtime Error | 400 | 24816 | 300 | def cost(x1,y1,x2,y2):
return abs(x1-x2) + abs(y1-y2)
n = int(input())
x = []
y = []
for i in range(n):
a,b = map(int,input().split())
x.append(a)
y.append(b)
ans = - math.inf
for i in range(n):
for j in range(i+1,n):
ans = max(ans,cost(x[i],y[i],x[j],y[j]))
print(ans) | Traceback (most recent call last):
File "/tmp/tmpm8x2abwu/tmp8v5qn0mo.py", line 5, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s575277350 | p02556 | u193172405 | 1600026622 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9012 | 284 | x = int(input())
points = []
for i in range(x):
a = list(map(int, input().split()))
points.append(a)
d_max = -1
for i in range(x):
for j in range(i+1, x):
d = abs(points[i][0] - points[j][0]) + abs(points[i][1] - points[j][1])
d_max = max(d, d_max)
print(d_max)
| File "/tmp/tmpu2ywvpmr/tmpivvjhp_q.py", line 5
points.append(a)
^
IndentationError: unindent does not match any outer indentation level
| |
s306224947 | p02556 | u091051505 | 1600026571 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 40648 | 1871 | def signed_area(p1, p2, p3):
'''符号付き面積を計算 '''
area = (((p2[0] - p1[0]) * (p3[1] - p1[1])) - ((p3[0] - p1[0]) * (p2[1] - p1[1]))) / 2
return area
def convex_hull(p_list):
'''グラハムの凸包走査 '''
p_sort = []
for i in p_list:
p_sort.append(i[0])
# x座標が最小のものをリストの先頭に配置。
min_index = p_so... | Traceback (most recent call last):
File "/tmp/tmps80idla0/tmppgqiu1my.py", line 60, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s203307708 | p02556 | u061835391 | 1600026545 | Python | Python (3.8.2) | py | Runtime Error | 28 | 9204 | 186 | n=int(input())
for i in range(0,n):
a,b=int(input())
l.append((a,b))
i=0
while i<n:
c=abs(l[i%n][0]-l[(i+1)%n][0])+abs(l[i%n][1]-l[(i+1)%n][1])
w.append(c)
i=i+1
print(max(w))
| Traceback (most recent call last):
File "/tmp/tmp7h38__t_/tmp5q3omqbt.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s310689471 | p02556 | u766236264 | 1600026485 | Python | Python (3.8.2) | py | Runtime Error | 25 | 8980 | 418 | n = input()
n = int(n)
p = []
for i in range(n):
x,y = map(int, input().split(' '))
p.append([x, y])
maXP = max(p, key=lambda x:x[0])
miXP = min(p, key=lambda x:x[0])
maYP = max(p, key=lambda x:x[1])
miYP = min(p, key=lambda x:x[1])
mp = [maXP, miXP, maYP, miYP]
md = -1
for i in range(3):
for j in range(i+1, 4)... | File "/tmp/tmp5b559h17/tmp8_wxfg73.py", line 19
md = abs(x1 - x2) + abs(y1 - y2)
TabError: inconsistent use of tabs and spaces in indentation
| |
s004398417 | p02556 | u328179275 | 1600026425 | Python | Python (3.8.2) | py | Runtime Error | 24 | 9004 | 336 | import numpy as np
from numba import jit
@jit
xy = [map(int, input().split()) for _ in range(n)]
x, y = [list(i) for i in zip(*xy)]
a=[]
b=[]
for i in range(len(x)):
for j in range(i+1,len(x)):
a.append(abs(x[j]-x[i]))
b.append(abs(y[j]-y[i]))
a_n = np.array(a)
b_n = np.array(b)
c = a_n+b_n
print(c[... | File "/tmp/tmpe_j5rxap/tmp34t1krp2.py", line 4
xy = [map(int, input().split()) for _ in range(n)]
^^
SyntaxError: invalid syntax
| |
s388512242 | p02556 | u061835391 | 1600026424 | Python | Python (3.8.2) | py | Runtime Error | 27 | 9220 | 184 | n=int(input())
l=[]
for i in range(0,n):
a,b=int(input())
l.append((a,b))
i=0
w=[]
while i<n:
c=abs(l[i][0]-l[i+1][0])+abs(l[i][1]-l[i+1][1])
w.append(c)
i=i+2
print(max(w))
| Traceback (most recent call last):
File "/tmp/tmpfzt10s0z/tmpikzcpadr.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s168434748 | p02556 | u061835391 | 1600026357 | Python | Python (3.8.2) | py | Runtime Error | 29 | 9176 | 165 | n=int(input())
for i in range(0,n):
a,b=int(input())
l.append((a,b))
i=0
while i<n:
c=abs(l[i][0]-l[i+1][0])+abs(l[i][1]-l[i+1][1])
w.append(c)
print(max(w)) | Traceback (most recent call last):
File "/tmp/tmp0om7wzk5/tmpt84wk2zz.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s218445263 | p02556 | u546853743 | 1600026304 | Python | Python (3.8.2) | py | Runtime Error | 347 | 9084 | 226 | n=int(input())
max=0
for i in range(n):
x,y=map(int,input().split())
for j in range(n):
for k in range(j,n):
if (abs(x[j]-x[k])+abs(y[j]-y[k]))>max:
max = (abs(x[j]-x[k])+abs(y[j]-y[k]))
print(max) | Traceback (most recent call last):
File "/tmp/tmpmoelimd6/tmp9e6f823d.py", line 1, in <module>
n=int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s873935568 | p02556 | u688839540 | 1600025890 | Python | Python (3.8.2) | py | Runtime Error | 25 | 9116 | 199 | 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) | Traceback (most recent call last):
File "/tmp/tmp1bgfi8ey/tmphlqk5a0v.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s051851054 | p02556 | u248364740 | 1600025833 | Python | Python (3.8.2) | py | Runtime Error | 2206 | 49280 | 495 | import itertools
n = int(input())
node = {}
for i in range(n):
x, y = map(int, input().strip().split())
if x in node.keys():
if y < node[x][0]:
node[x][0] = y
elif y > node[x][1]:
node[y][1] = y
else:
node[x] = [y, y]
res = 0
for key1, value1 in node.items()... | Traceback (most recent call last):
File "/tmp/tmptgvi93vo/tmp9quhhxvs.py", line 3, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
| |
s300992297 | p02556 | u236441175 | 1600025590 | Python | Python (3.8.2) | py | Runtime Error | 604 | 29732 | 357 | n = int(input())
import numpy as np
dots = np.zeros((n,2),dtype=np.int)
for i in range(n):
x,y = input().split()
dots[i,:] = int(x),int(y)
max_dis=0
x = dots[:,0]
y = dots[:,1]
x_dis_array = np.abs(x - x[:,np.newaxis])
y_dis_array = np.abs(y - y[:,np.newaxis])
dis_array = x_dis_array + y_dis_array
max_dis =... | Traceback (most recent call last):
File "/tmp/tmpi35ejtb1/tmpqh07dgdh.py", line 1, in <module>
n = int(input())
^^^^^^^
EOFError: EOF when reading a line
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.