結果

問題 No.216 FAC
ユーザー kuuso1
提出日時 2016-08-18 18:04:07
言語 F#
(F# 4.0)
結果
RE  
実行時間 -
コード長 593 bytes
コンパイル時間 8,554 ms
コンパイル使用メモリ 196,444 KB
実行使用メモリ 38,400 KB
最終ジャッジ日時 2024-11-07 19:29:37
合計ジャッジ時間 12,070 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 18 RE * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (239 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/

ソースコード

diff #

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 ksScore = Seq.find (fun p -> (fst p) = 0 ) AB |> 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()
0