結果
| 問題 |
No.1285 ゴミ捨て
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-30 23:50:15 |
| 言語 | F# (F# 4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 367 bytes |
| コンパイル時間 | 9,413 ms |
| コンパイル使用メモリ | 186,152 KB |
| 実行使用メモリ | 43,292 KB |
| 最終ジャッジ日時 | 2024-11-19 13:29:19 |
| 合計ジャッジ時間 | 20,054 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (301 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 calc a =
let a_sorted = Array.append (Array.sort a) [| 0 |]
let index = [| 1 .. a_sorted.Length - 1 |]
(Array.filter (fun i -> a_sorted.[i] - a_sorted.[i - 1] = 1) index).Length + 1
let main =
let n = stdin.ReadLine() |> int
let e =
[| for i = 0 to n - 1 do
stdin.ReadLine() |> int |]
printfn "%d" (calc e)
0