結果
問題 | No.79 過小評価ダメ・ゼッタイ |
ユーザー | Nobita Gomu |
提出日時 | 2017-09-28 01:24:21 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 101 ms / 5,000 ms |
コード長 | 631 bytes |
コンパイル時間 | 4,956 ms |
コンパイル使用メモリ | 156,776 KB |
実行使用メモリ | 25,320 KB |
最終ジャッジ日時 | 2023-09-08 15:16:06 |
合計ジャッジ時間 | 8,560 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 94 ms
25,320 KB |
testcase_01 | AC | 97 ms
17,620 KB |
testcase_02 | AC | 90 ms
17,220 KB |
testcase_03 | AC | 91 ms
17,372 KB |
testcase_04 | AC | 90 ms
17,292 KB |
testcase_05 | AC | 101 ms
17,688 KB |
testcase_06 | AC | 96 ms
17,276 KB |
testcase_07 | AC | 95 ms
17,300 KB |
testcase_08 | AC | 91 ms
17,312 KB |
testcase_09 | AC | 92 ms
17,376 KB |
testcase_10 | AC | 91 ms
17,304 KB |
testcase_11 | AC | 96 ms
17,316 KB |
testcase_12 | AC | 92 ms
17,280 KB |
testcase_13 | AC | 95 ms
17,296 KB |
testcase_14 | AC | 97 ms
17,312 KB |
testcase_15 | AC | 96 ms
17,356 KB |
testcase_16 | AC | 98 ms
17,360 KB |
testcase_17 | AC | 96 ms
17,400 KB |
testcase_18 | AC | 98 ms
17,404 KB |
testcase_19 | AC | 97 ms
17,208 KB |
testcase_20 | AC | 100 ms
17,568 KB |
testcase_21 | AC | 95 ms
17,244 KB |
testcase_22 | AC | 96 ms
17,348 KB |
testcase_23 | AC | 100 ms
17,556 KB |
testcase_24 | AC | 99 ms
17,620 KB |
コンパイルメッセージ
Microsoft (R) F# Compiler version 11.0.0.0 for F# 5.0 Copyright (c) Microsoft Corporation. All Rights Reserved.
ソースコード
type Buf = { a:int[]; offset:int } with member private this.update (c:char) = let idx = (int c) - this.offset this.a.[idx] <- this.a.[idx] + 1 member this.reader (s:string) = s |> Seq.filter (fun c -> c <> ' ') |> Seq.iter (fun c -> this.update c) member this.maxvalue = this.a |> Seq.mapi (fun i v -> (i+1, v)) |> Seq.sortBy (fun (i, v) -> v) |> Seq.last |> fun (i, v) -> i let buf = { a = [| for _ in 1..6 -> 0 |]; offset = int '1' } stdin.ReadLine () |> ignore stdin.ReadLine () |> buf.reader |> ignore buf.maxvalue |> printfn "%d"