結果
問題 |
No.349 干支の置き物
|
ユーザー |
|
提出日時 | 2016-04-29 18:45:18 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 401 bytes |
コンパイル時間 | 9,050 ms |
コンパイル使用メモリ | 193,184 KB |
実行使用メモリ | 34,652 KB |
最終ジャッジ日時 | 2024-10-04 17:50:00 |
合計ジャッジ時間 | 12,214 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 29 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (269 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 seq { for _ in 1..N -> Console.ReadLine ()} |> Seq.toList |> Seq.ofList |> judgeEto |> (fun result -> if result then "YES" else "NO") |> printf "%A"