結果
問題 | No.182 新規性の虜 |
ユーザー |
|
提出日時 | 2023-07-30 10:50:36 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 375 ms / 5,000 ms |
コード長 | 410 bytes |
コンパイル時間 | 8,192 ms |
コンパイル使用メモリ | 191,832 KB |
実行使用メモリ | 48,000 KB |
最終ジャッジ日時 | 2024-10-09 06:15:58 |
合計ジャッジ時間 | 20,194 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (250 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 a.Length = 1 then true elif 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"