結果
問題 |
No.349 干支の置き物
|
ユーザー |
|
提出日時 | 2016-04-29 19:07:38 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 394 bytes |
コンパイル時間 | 5,934 ms |
コンパイル使用メモリ | 192,780 KB |
実行使用メモリ | 34,568 KB |
最終ジャッジ日時 | 2024-10-04 17:52:26 |
合計ジャッジ時間 | 10,020 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 29 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (207 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/
ソースコード
open System let judgeEto inseq = let maxNum = int (ceil (float (Seq.length inseq) / 2.)) inseq |> Seq.groupBy id |> Seq.map (fun (key, gseq) -> Seq.length gseq) |> Seq.max |> (fun nmax -> nmax <= maxNum) let N = Console.ReadLine () |> int [1..N] |> List.map (fun _ -> Console.ReadLine ()) |> Seq.ofList |> judgeEto |> (fun result -> if result then "YES" else "NO") |> printfn "%A"