結果

問題 No.716 距離
ユーザー iad_2889iad_2889
提出日時 2019-04-27 14:49:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 10,580 KB
実行使用メモリ 8,368 KB
最終ジャッジ日時 2023-08-18 15:55:14
合計ジャッジ時間 10,154 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 428 ms
8,368 KB
testcase_01 AC 410 ms
8,360 KB
testcase_02 AC 414 ms
8,240 KB
testcase_03 AC 418 ms
8,248 KB
testcase_04 AC 409 ms
8,352 KB
testcase_05 AC 408 ms
8,160 KB
testcase_06 AC 417 ms
8,360 KB
testcase_07 AC 15 ms
7,960 KB
testcase_08 AC 15 ms
7,916 KB
testcase_09 AC 14 ms
7,816 KB
testcase_10 AC 284 ms
8,224 KB
testcase_11 WA -
testcase_12 AC 378 ms
8,232 KB
testcase_13 AC 252 ms
7,824 KB
testcase_14 WA -
testcase_15 AC 346 ms
8,344 KB
testcase_16 AC 146 ms
7,812 KB
testcase_17 AC 363 ms
8,332 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 16 ms
7,920 KB
testcase_21 AC 21 ms
7,816 KB
testcase_22 AC 52 ms
7,856 KB
testcase_23 AC 20 ms
7,920 KB
testcase_24 AC 288 ms
8,228 KB
testcase_25 AC 91 ms
8,008 KB
testcase_26 WA -
testcase_27 AC 220 ms
7,800 KB
testcase_28 AC 20 ms
7,744 KB
testcase_29 AC 181 ms
7,916 KB
testcase_30 AC 174 ms
7,812 KB
testcase_31 AC 264 ms
8,236 KB
testcase_32 AC 210 ms
7,828 KB
testcase_33 AC 193 ms
7,824 KB
testcase_34 AC 141 ms
7,808 KB
testcase_35 WA -
testcase_36 AC 37 ms
7,828 KB
testcase_37 AC 16 ms
7,812 KB
testcase_38 WA -
testcase_39 AC 182 ms
7,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
points = list({int(x) for x in input().split()})
if len(points) < N:
    min_distance = 0
else:
    min_distance = points[1] - points[0]

max_distance = points[1] - points[0]
for i in range(len(points) - 1):
    pi = points[i]
    for j in points[i + 1:]:
        temp = abs(j - pi)
        max_distance = max([max_distance,temp])
        min_distance = min(min_distance,temp)

print(min_distance)
print(max_distance)
0