結果
| 問題 | No.135 とりあえず1次元の問題 |
| コンテスト | |
| ユーザー |
はむ吉🐹
|
| 提出日時 | 2016-08-21 16:38:09 |
| 言語 | F# (F# 10.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 404 ms / 5,000 ms |
| + 288µs | |
| コード長 | 298 bytes |
| 記録 | |
| コンパイル時間 | 5,242 ms |
| コンパイル使用メモリ | 212,652 KB |
| 実行使用メモリ | 85,748 KB |
| 最終ジャッジ日時 | 2026-10-11 11:16:20 |
| 合計ジャッジ時間 | 13,401 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (176 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.0/publish/
ソースコード
let computeMin xs =
let ys = Set.ofSeq xs |> Set.toSeq
if Seq.length ys < 2 then 0
else Seq.pairwise ys |> Seq.map (fun (x, y) -> y - x |> abs) |> Seq.min
let () =
let _ = stdin.ReadLine()
let xs = stdin.ReadLine().Split(' ') |> Array.map int
computeMin xs |> printfn "%d"
はむ吉🐹