結果
問題 |
No.135 とりあえず1次元の問題
|
ユーザー |
![]() |
提出日時 | 2015-02-26 18:01:44 |
言語 | Nim (2.2.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 294 bytes |
コンパイル時間 | 3,527 ms |
コンパイル使用メモリ | 65,792 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-06-28 22:19:10 |
合計ジャッジ時間 | 19,116 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 RE * 1 |
other | AC * 10 RE * 12 |
コンパイルメッセージ
/home/judge/data/code/Main.nim(1, 39) Warning: imported and not used: 'math' [UnusedImport]
ソースコード
import strutils, sequtils, algorithm, math var n = readLine(stdin).parseInt x_seq = split(readLine(stdin), ' ').map(parseInt) min_v = high(int) x_seq = x_seq.deduplicate() x_seq.sort(cmp[int]) for i in countup(0, n - 2): min_v = min(min_v, abs(x_seq[i] - x_seq[i + 1])) echo(min_v)