結果
問題 |
No.216 FAC
|
ユーザー |
![]() |
提出日時 | 2016-08-18 18:12:59 |
言語 | F# (F# 4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 665 bytes |
コンパイル時間 | 11,846 ms |
コンパイル使用メモリ | 196,948 KB |
実行使用メモリ | 37,120 KB |
最終ジャッジ日時 | 2024-11-07 19:30:02 |
合計ジャッジ時間 | 10,821 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 RE * 1 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (314 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/
ソースコード
open System type Sol() = member this.Solve() = let N = stdin.ReadLine() |> int let A = stdin.ReadLine().Split() |> Array.map int let B = stdin.ReadLine().Split() |> Array.map int let AB = Array.zip B A |> Seq.groupBy fst |>Seq.map (fun (x,ss) -> (x,Seq.sumBy snd ss) ) let res = Seq.tryFind (fun p -> (fst p) = 0 ) AB let ksScore = if Option.isNone res then 0 else (Option.get res |> snd) let elseScore = Seq.filter (fun p -> (fst p) <> 0 ) AB |> Seq.map snd |> Seq.max (if ksScore < elseScore then "NO" else "YES") |> printfn "%s" let mySol = new Sol() mySol.Solve()