結果

問題 No.135 とりあえず1次元の問題
コンテスト
ユーザー toshiro_yanagi
提出日時 2018-06-03 15:52:55
言語 Nim
(2.2.10)
コンパイル:
nim --nimcache=~ --hints:off -o:a.out -d:release cpp _filename_
実行:
./a.out
結果
AC  
実行時間 2,990 ms / 5,000 ms
+ 839µs
コード長 233 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,551 ms
コンパイル使用メモリ 70,176 KB
実行使用メモリ 11,648 KB
最終ジャッジ日時 2026-08-02 08:16:02
合計ジャッジ時間 15,796 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import strutils, sequtils, algorithm

var
  N, X = stdin.readLine.split.map parseInt
  best = int.high

X = X.deduplicate.sorted(cmp)

for i in 0 ..< X.high:
  best = min(best, X[i + 1] - X[i])

[best, 0][int(best == int.high)].echo
0