結果
問題 |
No.182 新規性の虜
|
ユーザー |
|
提出日時 | 2023-07-30 10:48:25 |
言語 | F# (F# 4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 362 bytes |
コンパイル時間 | 10,415 ms |
コンパイル使用メモリ | 192,120 KB |
実行使用メモリ | 47,872 KB |
最終ジャッジ日時 | 2024-10-09 06:13:49 |
合計ジャッジ時間 | 22,875 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 RE * 2 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (448 ms)。 MSBuild のバージョン 17.9.6+a4ecab324 (.NET) main -> /home/judge/data/code/bin/Release/net8.0/main.dll main -> /home/judge/data/code/bin/Release/net8.0/publish/
ソースコード
let n = stdin.ReadLine () |> int let a = stdin.ReadLine().Split " " |> Array.map int |> Array.sort [| for i in 0..a.Length-1 -> if i = 0 then a.[i] <> a.[i+1] elif i = a.Length-1 then a.[i] <> a.[i-1] else a.[i] <> a.[i-1] && a.[i] <> a.[i+1] |] |> Array.filter id |> Array.length |> printfn "%d"