結果

問題 No.1998 Manhattan Restaurant
ユーザー MasKoaTSMasKoaTS
提出日時 2022-03-24 13:48:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 110 ms / 2,000 ms
コード長 550 bytes
コンパイル時間 566 ms
コンパイル使用メモリ 81,848 KB
実行使用メモリ 81,848 KB
最終ジャッジ日時 2023-10-21 01:14:56
合計ジャッジ時間 4,008 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,472 KB
testcase_01 AC 35 ms
53,472 KB
testcase_02 AC 35 ms
53,472 KB
testcase_03 AC 34 ms
53,472 KB
testcase_04 AC 35 ms
53,472 KB
testcase_05 AC 34 ms
53,472 KB
testcase_06 AC 41 ms
53,472 KB
testcase_07 AC 39 ms
55,520 KB
testcase_08 AC 39 ms
55,520 KB
testcase_09 AC 38 ms
55,520 KB
testcase_10 AC 37 ms
53,472 KB
testcase_11 AC 36 ms
53,472 KB
testcase_12 AC 37 ms
53,472 KB
testcase_13 AC 36 ms
53,472 KB
testcase_14 AC 37 ms
55,520 KB
testcase_15 AC 104 ms
81,848 KB
testcase_16 AC 78 ms
79,052 KB
testcase_17 AC 87 ms
81,716 KB
testcase_18 AC 85 ms
79,100 KB
testcase_19 AC 93 ms
80,296 KB
testcase_20 AC 110 ms
81,848 KB
testcase_21 AC 98 ms
81,248 KB
testcase_22 AC 96 ms
81,244 KB
testcase_23 AC 97 ms
81,248 KB
testcase_24 AC 98 ms
81,248 KB
testcase_25 AC 55 ms
68,636 KB
testcase_26 AC 90 ms
80,280 KB
testcase_27 AC 83 ms
78,192 KB
testcase_28 AC 85 ms
80,292 KB
testcase_29 AC 79 ms
78,136 KB
testcase_30 AC 98 ms
81,764 KB
testcase_31 AC 88 ms
81,712 KB
testcase_32 AC 54 ms
72,748 KB
testcase_33 AC 84 ms
79,084 KB
testcase_34 AC 87 ms
80,852 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