結果

問題 No.773 コンテスト
ユーザー chikepluschikeplus
提出日時 2019-01-24 17:40:03
言語 F#
(F# 4.0)
結果
WA  
実行時間 -
コード長 504 bytes
コンパイル時間 4,278 ms
コンパイル使用メモリ 165,592 KB
実行使用メモリ 24,972 KB
最終ジャッジ日時 2023-10-14 09:40:31
合計ジャッジ時間 6,882 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
22,844 KB
testcase_01 AC 88 ms
22,944 KB
testcase_02 AC 88 ms
24,924 KB
testcase_03 WA -
testcase_04 AC 86 ms
22,904 KB
testcase_05 AC 87 ms
24,972 KB
testcase_06 AC 86 ms
23,048 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 88 ms
23,188 KB
testcase_12 WA -
testcase_13 AC 88 ms
23,008 KB
testcase_14 AC 87 ms
22,896 KB
testcase_15 WA -
testcase_16 AC 87 ms
23,100 KB
testcase_17 WA -
testcase_18 AC 89 ms
22,780 KB
testcase_19 AC 89 ms
22,800 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 87 ms
23,092 KB
testcase_23 AC 87 ms
23,116 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

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)
0