結果

問題 No.216 FAC
ユーザー kuuso1kuuso1
提出日時 2016-08-18 18:15:43
言語 F#
(F# 4.0)
結果
AC  
実行時間 92 ms / 1,000 ms
コード長 738 bytes
コンパイル時間 6,958 ms
コンパイル使用メモリ 196,260 KB
実行使用メモリ 32,128 KB
最終ジャッジ日時 2024-04-25 08:59:07
合計ジャッジ時間 10,639 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
31,488 KB
testcase_01 AC 83 ms
31,744 KB
testcase_02 AC 80 ms
31,488 KB
testcase_03 AC 86 ms
31,872 KB
testcase_04 AC 80 ms
31,616 KB
testcase_05 AC 79 ms
31,488 KB
testcase_06 AC 91 ms
31,608 KB
testcase_07 AC 87 ms
31,616 KB
testcase_08 AC 88 ms
31,744 KB
testcase_09 AC 87 ms
31,616 KB
testcase_10 AC 88 ms
32,000 KB
testcase_11 AC 86 ms
31,360 KB
testcase_12 AC 87 ms
32,128 KB
testcase_13 AC 87 ms
31,868 KB
testcase_14 AC 90 ms
31,744 KB
testcase_15 AC 91 ms
31,732 KB
testcase_16 AC 90 ms
31,616 KB
testcase_17 AC 92 ms
31,744 KB
testcase_18 AC 81 ms
31,744 KB
testcase_19 AC 80 ms
31,616 KB
testcase_20 AC 82 ms
31,744 KB
testcase_21 AC 81 ms
31,744 KB
testcase_22 AC 80 ms
31,744 KB
testcase_23 AC 79 ms
31,744 KB
testcase_24 AC 78 ms
31,616 KB
testcase_25 AC 82 ms
31,872 KB
testcase_26 AC 82 ms
31,744 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
  復元対象のプロジェクトを決定しています...
  /home/judge/data/code/main.fsproj を復元しました (236 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 elseMem = Seq.filter (fun p -> (fst p) <> 0 ) AB 
        let elseScore = if (Seq.length elseMem = 0) then 0 else (elseMem |> Seq.map snd |> Seq.max)
        (if ksScore < elseScore then "NO" else "YES") |> printfn "%s"
        
        
let mySol = new Sol()
mySol.Solve()
0