結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2018-08-07 18:16:21 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 451 bytes |
コンパイル時間 | 6,087 ms |
コンパイル使用メモリ | 187,700 KB |
実行使用メモリ | 45,536 KB |
最終ジャッジ日時 | 2024-09-19 18:28:41 |
合計ジャッジ時間 | 7,621 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 5 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (204 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/
ソースコード
let f xs = let size = Array.length let isOdd x = x % 2 <> 0 let odds = xs |> Array.where(isOdd) let eves = xs |> Array.where(isOdd >> fun x -> not x) let oddsN = odds |> size let evesN = eves |> size match (isOdd oddsN), (isOdd evesN) with | true, true -> 0 | true, _ -> 1 | _, true -> 1 | _ -> 2 let R() = stdin.ReadLine() let N = R() |> int let X = R().Split() |> Array.map int f X |> stdout.WriteLine