結果
| 問題 | No.135 とりあえず1次元の問題 |
| コンテスト | |
| ユーザー |
Rin
|
| 提出日時 | 2015-09-08 17:04:13 |
| 言語 | Scheme (Gauche-0.9.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 942 bytes |
| 記録 | |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 6,400 KB |
| 実行使用メモリ | 34,048 KB |
| 最終ジャッジ日時 | 2026-06-06 13:07:17 |
| 合計ジャッジ時間 | 13,084 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | -- * 2 |
| other | TLE * 1 -- * 21 |
ソースコード
(define (System.out.println x)
(begin
(display x)
(newline)
)
)
(let (
(N (read))
)
(let loop(
(foo (read))
(bar '())
)
(if (not (eof-object? foo))
(loop (read) (cons foo bar))
(let loop2(
(i 0)
(Min 0)
(ls (sort bar <))
)
(if (and (not (= (list-ref ls i) (list-ref ls (+ i 1))))
(or (< (abs (- (list-ref ls i) (list-ref ls (+ i 1)))) Min) (= Min 0)))
(if (= i (- (length ls) 2))
(System.out.println (abs (- (list-ref ls i) (list-ref ls (+ i 1)))))
(loop2 (+ i 1) (abs (- (list-ref ls i) (list-ref ls (+ i 1)))) ls)
)
(if (= i (- (length ls) 2))
(System.out.println Min)
(loop2 (+ i 1) Min ls)
)
)
)
)
)
)
Rin