結果

問題 No.1998 Manhattan Restaurant
ユーザー MasKoaTSMasKoaTS
提出日時 2022-03-23 18:59:34
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 416 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 11,908 KB
実行使用メモリ 23,968 KB
最終ジャッジ日時 2023-10-21 01:14:51
合計ジャッジ時間 7,411 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
9,912 KB
testcase_01 AC 27 ms
9,912 KB
testcase_02 AC 25 ms
9,912 KB
testcase_03 AC 24 ms
9,912 KB
testcase_04 AC 24 ms
9,912 KB
testcase_05 AC 24 ms
9,912 KB
testcase_06 AC 26 ms
9,980 KB
testcase_07 AC 28 ms
9,996 KB
testcase_08 AC 28 ms
9,996 KB
testcase_09 AC 27 ms
9,996 KB
testcase_10 AC 27 ms
9,976 KB
testcase_11 AC 27 ms
9,932 KB
testcase_12 AC 25 ms
9,916 KB
testcase_13 AC 27 ms
9,924 KB
testcase_14 AC 30 ms
9,996 KB
testcase_15 AC 403 ms
23,840 KB
testcase_16 AC 238 ms
17,412 KB
testcase_17 AC 320 ms
20,484 KB
testcase_18 AC 241 ms
17,692 KB
testcase_19 AC 262 ms
18,540 KB
testcase_20 AC 388 ms
23,840 KB
testcase_21 AC 409 ms
23,968 KB
testcase_22 AC 416 ms
23,968 KB
testcase_23 AC 413 ms
23,968 KB
testcase_24 AC 412 ms
23,968 KB
testcase_25 AC 49 ms
10,756 KB
testcase_26 AC 264 ms
18,252 KB
testcase_27 AC 186 ms
15,532 KB
testcase_28 AC 265 ms
18,528 KB
testcase_29 AC 193 ms
15,804 KB
testcase_30 AC 376 ms
22,176 KB
testcase_31 AC 339 ms
21,320 KB
testcase_32 AC 61 ms
11,184 KB
testcase_33 AC 227 ms
17,408 KB
testcase_34 AC 287 ms
19,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
INF = 10 ** 18

N = int(input())
P = []
for _ in [0] * N:
	x, y = map(int, input().split())
	P.append((x + y, x - y))

max_x = max_y = -INF
min_x = min_y = INF
for x, y in P:
	if(max_x < x):
		max_x = x
	if(max_y < y):
		max_y = y
	if(min_x > x):
		min_x = x
	if(min_y > y):
		min_y = y

a = b = 0
for x, y in P:
	k = min(max(max_x - x, max_y - y), max(x - min_x, y - min_y))
	l = min(max(max_x - x, y - min_y), max(x - min_x, max_y - y))
	if(a < k):
		a = k
	if(b < l):
		b = l

ans = min(a, b) // 2
print(ans)
0