結果
問題 | No.99 ジャンピング駒 |
ユーザー | tak |
提出日時 | 2018-08-07 18:18:20 |
言語 | F# (F# 4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 466 bytes |
コンパイル時間 | 6,726 ms |
コンパイル使用メモリ | 190,888 KB |
実行使用メモリ | 47,300 KB |
最終ジャッジ日時 | 2023-10-19 22:29:04 |
合計ジャッジ時間 | 8,219 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 106 ms
47,296 KB |
testcase_01 | AC | 104 ms
47,296 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
コンパイルメッセージ
復元対象のプロジェクトを決定しています... /home/judge/data/code/main.fsproj を復元しました (238 ms)。 MSBuild のバージョン 17.7.3+8ec440e68 (.NET) main -> /home/judge/data/code/bin/Release/net7.0/main.dll main -> /home/judge/data/code/bin/Release/net7.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