結果
| 問題 | No.135 とりあえず1次元の問題 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-04-16 14:40:53 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
不安定
|
| 実行時間 | 89 ms / 5,000 ms |
| + 464µs | |
| コード長 | 319 bytes |
| 記録 | |
| コンパイル時間 | 60 ms |
| コンパイル使用メモリ | 81,132 KB |
| 実行使用メモリ | 111,380 KB |
| 最終ジャッジ日時 | 2026-10-11 11:07:44 |
| 合計ジャッジ時間 | 3,102 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
ソースコード
#!/usr/bin/python
from itertools import izip, tee
def pairwise(iterable):
"s -> (s0,s1), (s1,s2), (s2,s3), ..."
a, b = tee(iterable)
next(b, None)
return izip(a, b)
N = int(raw_input())
X = map(int, raw_input().split())
srt = sorted(set(X))
difs = [y-x for x, y in pairwise(srt)] or [0]
print min(difs)