結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー | guricerin |
提出日時 | 2020-01-08 17:32:00 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 100 ms / 5,000 ms |
コード長 | 1,013 bytes |
コンパイル時間 | 3,347 ms |
コンパイル使用メモリ | 161,764 KB |
実行使用メモリ | 29,264 KB |
最終ジャッジ日時 | 2023-08-15 00:41:21 |
合計ジャッジ時間 | 6,533 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 71 ms
22,944 KB |
testcase_01 | AC | 97 ms
27,180 KB |
testcase_02 | AC | 62 ms
22,468 KB |
testcase_03 | AC | 61 ms
22,572 KB |
testcase_04 | AC | 61 ms
22,380 KB |
testcase_05 | AC | 96 ms
29,264 KB |
testcase_06 | AC | 61 ms
22,672 KB |
testcase_07 | AC | 61 ms
22,636 KB |
testcase_08 | AC | 60 ms
22,604 KB |
testcase_09 | AC | 62 ms
24,576 KB |
testcase_10 | AC | 64 ms
22,612 KB |
testcase_11 | AC | 61 ms
22,532 KB |
testcase_12 | AC | 62 ms
24,540 KB |
testcase_13 | AC | 62 ms
24,500 KB |
testcase_14 | AC | 85 ms
23,664 KB |
testcase_15 | AC | 75 ms
23,480 KB |
testcase_16 | AC | 91 ms
26,760 KB |
testcase_17 | AC | 75 ms
23,452 KB |
testcase_18 | AC | 90 ms
26,556 KB |
testcase_19 | AC | 84 ms
25,720 KB |
testcase_20 | AC | 100 ms
25,132 KB |
testcase_21 | AC | 71 ms
22,636 KB |
testcase_22 | AC | 80 ms
25,432 KB |
testcase_23 | AC | 95 ms
27,012 KB |
testcase_24 | AC | 98 ms
27,264 KB |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
open System open System.Collections.Generic [<AutoOpen>] module Cin = let read f = stdin.ReadLine() |> f let reada f = stdin.ReadLine().Split() |> Array.map f let readChars() = read string |> Seq.toArray let readInts() = readChars() |> Array.map (fun x -> Convert.ToInt32(x.ToString())) [<AutoOpen>] module Cout = let writer = new IO.StreamWriter(new IO.BufferedStream(Console.OpenStandardOutput())) let print (s: string) = writer.Write s let println (s: string) = writer.WriteLine s let inline puts (s: ^a) = string s |> println let solve() = let N = read int let ls = reada int let cnt = Array.zeroCreate 7 ls |> Array.iter (fun l -> cnt.[l] <- cnt.[l] + 1) let mutable ans = 0 let nax = Array.max cnt cnt |> Array.iteri (fun i c -> if c = nax && ans < i then ans <- i) puts ans [<EntryPoint>] let main _ = try solve() with e -> printfn "%s" (e.ToString()) writer.Close() 0 // return an integer exit code