結果

問題 No.216 FAC
ユーザー kuuso1kuuso1
提出日時 2016-08-18 18:12:59
言語 F#
(F# 4.0)
結果
RE  
実行時間 -
コード長 665 bytes
コンパイル時間 7,258 ms
コンパイル使用メモリ 189,580 KB
実行使用メモリ 37,120 KB
最終ジャッジ日時 2024-04-25 08:58:55
合計ジャッジ時間 9,075 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

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