結果

問題 No.216 FAC
ユーザー kuuso1kuuso1
提出日時 2016-08-18 18:04:07
言語 F#
(F# 4.0)
結果
RE  
実行時間 -
コード長 593 bytes
コンパイル時間 5,964 ms
コンパイル使用メモリ 188,348 KB
実行使用メモリ 38,400 KB
最終ジャッジ日時 2024-04-25 08:58:34
合計ジャッジ時間 10,896 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 75 ms
31,744 KB
testcase_01 AC 77 ms
31,564 KB
testcase_02 AC 75 ms
31,488 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 75 ms
31,360 KB
testcase_09 AC 74 ms
32,000 KB
testcase_10 AC 76 ms
31,488 KB
testcase_11 AC 76 ms
31,616 KB
testcase_12 AC 79 ms
31,744 KB
testcase_13 AC 75 ms
31,616 KB
testcase_14 AC 76 ms
31,744 KB
testcase_15 AC 76 ms
31,872 KB
testcase_16 AC 76 ms
31,872 KB
testcase_17 AC 76 ms
31,872 KB
testcase_18 AC 77 ms
32,000 KB
testcase_19 AC 85 ms
31,744 KB
testcase_20 AC 76 ms
31,744 KB
testcase_21 RE -
testcase_22 AC 78 ms
31,616 KB
testcase_23 AC 76 ms
31,360 KB
testcase_24 AC 74 ms
32,000 KB
testcase_25 AC 74 ms
31,744 KB
testcase_26 AC 74 ms
31,488 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (206 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