結果

問題 No.135 とりあえず1次元の問題
ユーザー regeregeregerege
提出日時 2016-06-19 00:07:27
言語 F#
(F# 4.0)
結果
AC  
実行時間 332 ms / 5,000 ms
コード長 228 bytes
コンパイル時間 4,879 ms
コンパイル使用メモリ 158,228 KB
実行使用メモリ 46,384 KB
最終ジャッジ日時 2023-09-02 00:26:55
合計ジャッジ時間 8,440 ms
ジャッジサーバーID
(参考情報)
judge15 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 332 ms
46,384 KB
testcase_01 AC 92 ms
23,228 KB
testcase_02 AC 92 ms
23,204 KB
testcase_03 AC 87 ms
23,120 KB
testcase_04 AC 92 ms
23,268 KB
testcase_05 AC 92 ms
23,216 KB
testcase_06 AC 92 ms
23,252 KB
testcase_07 AC 92 ms
23,304 KB
testcase_08 AC 93 ms
23,368 KB
testcase_09 AC 92 ms
23,280 KB
testcase_10 AC 92 ms
25,260 KB
testcase_11 AC 92 ms
25,264 KB
testcase_12 AC 99 ms
23,252 KB
testcase_13 AC 92 ms
23,352 KB
testcase_14 AC 101 ms
25,360 KB
testcase_15 AC 98 ms
21,324 KB
testcase_16 AC 103 ms
23,356 KB
testcase_17 AC 100 ms
23,488 KB
testcase_18 AC 98 ms
23,392 KB
testcase_19 AC 100 ms
25,424 KB
testcase_20 AC 99 ms
25,416 KB
testcase_21 AC 150 ms
33,764 KB
testcase_22 AC 329 ms
44,220 KB
evil01.txt AC 293 ms
44,128 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let N = stdin.ReadLine() |> int
let s =
    stdin.ReadLine().Split(' ')
    |> Seq.map int
    |> Set.ofSeq
if s.Count <= 1 then 0
else
    s |> Seq.pairwise
    |> Seq.map (fun (a,b) -> abs(a-b))
    |> Seq.min
|> printfn "%d"
0