結果
| 問題 |
No.216 FAC
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-04-19 22:45:21 |
| 言語 | F# (F# 4.0) |
| 結果 |
AC
|
| 実行時間 | 75 ms / 1,000 ms |
| コード長 | 363 bytes |
| コンパイル時間 | 11,937 ms |
| コンパイル使用メモリ | 191,468 KB |
| 実行使用メモリ | 31,360 KB |
| 最終ジャッジ日時 | 2024-07-19 09:31:52 |
| 合計ジャッジ時間 | 15,273 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 24 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (274 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 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"