結果

問題 No.216 FAC
ユーザー regeregeregerege
提出日時 2017-04-19 22:45:21
言語 F#
(.NET 7)
結果
AC  
実行時間 94 ms / 1,000 ms
コード長 363 bytes
コンパイル時間 6,125 ms
コンパイル使用メモリ 155,644 KB
実行使用メモリ 25,112 KB
最終ジャッジ日時 2023-09-26 15:24:42
合計ジャッジ時間 10,007 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 90 ms
22,952 KB
testcase_01 AC 90 ms
25,060 KB
testcase_02 AC 93 ms
24,988 KB
testcase_03 AC 90 ms
21,000 KB
testcase_04 AC 89 ms
24,996 KB
testcase_05 AC 90 ms
25,056 KB
testcase_06 AC 88 ms
22,996 KB
testcase_07 AC 91 ms
25,048 KB
testcase_08 AC 89 ms
23,024 KB
testcase_09 AC 90 ms
22,956 KB
testcase_10 AC 90 ms
22,892 KB
testcase_11 AC 89 ms
25,112 KB
testcase_12 AC 88 ms
23,032 KB
testcase_13 AC 88 ms
23,060 KB
testcase_14 AC 90 ms
24,996 KB
testcase_15 AC 92 ms
25,056 KB
testcase_16 AC 92 ms
23,000 KB
testcase_17 AC 91 ms
24,916 KB
testcase_18 AC 94 ms
23,040 KB
testcase_19 AC 92 ms
22,944 KB
testcase_20 AC 90 ms
21,104 KB
testcase_21 AC 90 ms
23,028 KB
testcase_22 AC 90 ms
20,912 KB
testcase_23 AC 91 ms
23,016 KB
testcase_24 AC 90 ms
23,040 KB
testcase_25 AC 93 ms
22,956 KB
testcase_26 AC 91 ms
22,864 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0
Copyright (c) Microsoft Corporation. All Rights Reserved.

ソースコード

diff #

let R() = stdin.ReadLine().Split(' ') |> Array.map int
stdin.ReadLine() |> ignore
let S =
    Array.zip (R()) (R())
    |> Array.groupBy snd
    |> Array.map (fun (n,arr) -> n, Array.sumBy fst arr)
let K =
    Array.tryFind (fst >> (=)0) S
    |> function
    | Some (_,s) -> s
    | None -> 0
if Array.exists (snd >> (<)K) S then "NO"
else "YES"
|> printfn "%s"
0