結果
問題 | No.349 干支の置き物 |
ユーザー | guricerin |
提出日時 | 2020-01-14 22:52:18 |
言語 | F# (F# 4.0) |
結果 |
AC
|
実行時間 | 66 ms / 2,000 ms |
コード長 | 950 bytes |
コンパイル時間 | 4,501 ms |
コンパイル使用メモリ | 165,020 KB |
実行使用メモリ | 24,184 KB |
最終ジャッジ日時 | 2023-08-27 06:32:10 |
合計ジャッジ時間 | 7,817 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 63 ms
22,132 KB |
testcase_01 | AC | 64 ms
22,132 KB |
testcase_02 | AC | 63 ms
24,012 KB |
testcase_03 | AC | 63 ms
22,136 KB |
testcase_04 | AC | 64 ms
22,092 KB |
testcase_05 | AC | 62 ms
22,144 KB |
testcase_06 | AC | 63 ms
22,076 KB |
testcase_07 | AC | 62 ms
22,088 KB |
testcase_08 | AC | 62 ms
22,080 KB |
testcase_09 | AC | 62 ms
22,112 KB |
testcase_10 | AC | 62 ms
19,968 KB |
testcase_11 | AC | 63 ms
22,192 KB |
testcase_12 | AC | 63 ms
23,948 KB |
testcase_13 | AC | 65 ms
22,120 KB |
testcase_14 | AC | 64 ms
22,192 KB |
testcase_15 | AC | 63 ms
24,168 KB |
testcase_16 | AC | 62 ms
22,140 KB |
testcase_17 | AC | 63 ms
22,224 KB |
testcase_18 | AC | 61 ms
22,108 KB |
testcase_19 | AC | 62 ms
22,008 KB |
testcase_20 | AC | 60 ms
22,104 KB |
testcase_21 | AC | 63 ms
24,184 KB |
testcase_22 | AC | 66 ms
21,992 KB |
testcase_23 | AC | 62 ms
24,120 KB |
testcase_24 | AC | 62 ms
21,976 KB |
testcase_25 | AC | 63 ms
22,080 KB |
testcase_26 | AC | 64 ms
24,044 KB |
testcase_27 | AC | 64 ms
22,132 KB |
testcase_28 | AC | 62 ms
22,136 KB |
testcase_29 | AC | 63 ms
22,204 KB |
testcase_30 | AC | 62 ms
22,124 KB |
testcase_31 | AC | 62 ms
19,968 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 main() = let n = read int let st = Dictionary<string, int>() for i in 1 .. n do let s = read string if st.ContainsKey(s) then st.[s] <- st.[s] + 1 else st.Add(s, 1) let mult = st |> Seq.maxBy (fun kv -> kv.Value) |> fun kv -> kv.Value if (mult - 1) * 2 >= n then "NO" else "YES" |> puts () main() writer.Close()