結果
| 問題 |
No.773 コンテスト
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-24 17:41:57 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 295 ms / 2,000 ms |
| コード長 | 504 bytes |
| コンパイル時間 | 15,756 ms |
| コンパイル使用メモリ | 185,724 KB |
| 実行使用メモリ | 35,068 KB |
| 最終ジャッジ日時 | 2024-07-06 11:31:02 |
| 合計ジャッジ時間 | 25,248 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (323 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 = [23..25]
let dups = filter (fun x -> contains (fun y -> y = x ) contests ) [ (List.head args) .. (List.item 1 args) ]
printfn "%i" (contests.Length - dups.Length)