結果
問題 |
No.349 干支の置き物
|
ユーザー |
|
提出日時 | 2016-04-29 19:03:00 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 6,156 ms |
コンパイル使用メモリ | 185,596 KB |
実行使用メモリ | 34,912 KB |
最終ジャッジ日時 | 2024-10-04 17:50:44 |
合計ジャッジ時間 | 10,072 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 29 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (208 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") |> printf "%A"