結果
| 問題 | No.135 とりあえず1次元の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-09-06 09:31:53 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 432 bytes |
| 記録 | |
| コンパイル時間 | 426 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 28,912 KB |
| 最終ジャッジ日時 | 2026-05-23 03:25:15 |
| 合計ジャッジ時間 | 4,423 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 3 WA * 18 RE * 1 |
ソースコード
# coding=UTF-8
pointNum = int(input())
pointSet = set(map(int, input().split()))
pointList = list(pointSet)
center = int(round(len(pointSet) / 2, 0))
beforePoint = abs(pointList[center-2] - pointList[center-1])
afterPoint = abs(pointList[center-1] - pointList[center])
if beforePoint > afterPoint:
print(afterPoint)
elif beforePoint == afterPoint:
print(afterPoint)
elif beforePoint < afterPoint:
print(beforePoint)