結果
| 問題 | No.406 鴨等間隔の法則 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-14 11:56:53 |
| 言語 | OCaml (5.5.0) |
| 結果 |
AC
不安定
|
| 実行時間 | 41 ms / 2,000 ms |
| + 237µs | |
| コード長 | 345 bytes |
| 記録 | |
| コンパイル時間 | 137 ms |
| コンパイル使用メモリ | 22,436 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-12 07:35:49 |
| 合計ジャッジ時間 | 3,165 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 29 |
コンパイルメッセージ
ocamlfind: [WARNING] Cannot read directory ./stublibs which is mentioned in ld.conf
ソースコード
Scanf.scanf "%d" (fun n ->
let x = Array.init n (fun _ -> Scanf.scanf " %d" (fun x -> x)) in
Array.sort compare x;
let rec loop i =
if i = n then "YES" else
if x.(i) - x.(i - 1) = x.(i - 1) - x.(i - 2) then loop (i + 1)
else "NO"
in
(if x.(0) = x.(1) then "NO" else loop 2) |> print_endline
)