結果
問題 |
No.99 ジャンピング駒
|
ユーザー |
![]() |
提出日時 | 2018-08-07 18:18:20 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 6,282 ms |
コンパイル使用メモリ | 186,532 KB |
実行使用メモリ | 43,904 KB |
最終ジャッジ日時 | 2024-09-19 18:28:50 |
合計ジャッジ時間 | 7,490 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 WA * 4 |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (213 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 isEve x = not <| isOdd x let odds = xs |> Array.where(isOdd) let eves = xs |> Array.where(isEve) let oddsN = odds |> size let evesN = eves |> size match (isEve oddsN), (isEve 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