結果
問題 |
No.773 コンテスト
|
ユーザー |
|
提出日時 | 2019-01-24 17:40:03 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 504 bytes |
コンパイル時間 | 6,525 ms |
コンパイル使用メモリ | 194,020 KB |
実行使用メモリ | 35,188 KB |
最終ジャッジ日時 | 2024-09-16 04:39:27 |
合計ジャッジ時間 | 15,564 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 12 WA * 9 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (213 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 inputs = System.Console.ReadLine().Split(' ') let args = [for str in inputs do yield int(str) ] let rec contains f lt = match lt with | [] -> false | x::xs -> if f x then true else contains f xs let rec filter f lt = match lt with | [] -> [] | x::xs -> if f x then [x] @ (filter f xs) else filter f xs let contests = [24..26] let dups = filter (fun x -> contains (fun y -> y = x ) contests ) [ (List.head args) .. (List.item 1 args) ] printfn "%i" (contests.Length - dups.Length)