結果

問題 No.908 うしたぷにきあくん文字列
ユーザー maimai8maimai8
提出日時 2020-04-29 14:56:04
言語 OCaml
(5.1.0)
結果
WA  
実行時間 -
コード長 400 bytes
コンパイル時間 231 ms
コンパイル使用メモリ 19,568 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 08:53:32
合計ジャッジ時間 880 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 WA -
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 1 ms
5,376 KB
testcase_11 WA -
testcase_12 AC 2 ms
5,376 KB
testcase_13 WA -
testcase_14 AC 2 ms
5,376 KB
testcase_15 WA -
testcase_16 AC 2 ms
5,376 KB
testcase_17 WA -
testcase_18 AC 2 ms
5,376 KB
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

open Str
let lst = split_delim (regexp " ") (read_line ())
let rec make_nlst n = if n = 0 then [0] else (n-1) :: make_nlst (n-1)
let abc = split (regexp "") "abcdefghijklmnopqrstuvwxyz"
let f x = x mod 2 = 1 && List.nth lst x = "" || x mod 2 = 0 && List.mem (List.nth lst x) abc 
let ans = List.for_all (fun i -> f i) (make_nlst (List.length lst))
let () = print_endline (if ans then "Yes" else "No")
0