結果

問題 No.135 とりあえず1次元の問題
ユーザー Rin
提出日時 2015-09-08 17:04:13
言語 Scheme
(Gauche-0.9.15)
結果
TLE  
実行時間 -
コード長 942 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 43,264 KB
最終ジャッジ日時 2025-01-03 07:39:59
合計ジャッジ時間 31,781 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 TLE * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

(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)
              )
          )
        )
    )
  )
)
0