結果
| 問題 | No.1285 ゴミ捨て |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-30 23:50:15 |
| 言語 | F# (F# 10.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 367 bytes |
| 記録 | |
| コンパイル時間 | 6,766 ms |
| コンパイル使用メモリ | 208,980 KB |
| 実行使用メモリ | 43,624 KB |
| 最終ジャッジ日時 | 2026-05-13 19:55:40 |
| 合計ジャッジ時間 | 13,369 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 12 WA * 10 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (212 ミリ秒)。 main -> /home/judge/data/code/bin/Release/net10.0/main.dll main -> /home/judge/data/code/bin/Release/net10.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