結果
問題 | No.99 ジャンピング駒 |
ユーザー |
|
提出日時 | 2020-06-21 02:15:46 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 34 ms / 5,000 ms |
コード長 | 346 bytes |
コンパイル時間 | 502 ms |
コンパイル使用メモリ | 21,444 KB |
実行使用メモリ | 6,528 KB |
最終ジャッジ日時 | 2024-10-09 01:32:52 |
合計ジャッジ時間 | 1,368 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 |
ソースコード
Scanf.scanf "%d" (fun n ->let x = Array.init n (fun _ -> Scanf.scanf " %d" (fun x -> x)) inlet rec loop i ev od =if i = n then n - min ev od * 2 elseif abs x.(i) mod 2 = 0 then loop (i + 1) (ev + 1) odelse loop (i + 1) ev (od + 1)inloop 0 0 0 |> Printf.printf "%d\n")