Submission #110872


Source Code Expand

let (|>) x f = f x ;;
let (@@) f x = f x ;;

let ident x = x ;;
let ident2 x y = (x, y) ;;
let ident3 x y z = (x, y, z) ;;
let ident4 x y z w = (x, y, z, w) ;;
let ident5 x y z w v = (x, y, z, w, v) ;;

let char_to_int x = int_of_char x - int_of_char '0' ;;
let int_to_char x = char_of_int (x + int_of_char '0') ;;

module List = struct
  include ListLabels ;;

  let rec iteri i f = function
    | [] -> ()
    | a::l -> f i a; iteri (i + 1) f l

  let iteri ~f l = iteri 0 f l
end
;;

module Array = struct
  include ArrayLabels ;;

  let reduce ~f xs =
    let acc = ref xs.(0) in
    for i = 1 to length xs - 1 do
      acc := f !acc xs.(i)
    done;
    !acc
  ;;
end
;;

module String = struct
  include StringLabels ;;

  let map_to_list ~f ss =
    let res = ref [] in
    iter ss ~f:(fun c -> res := f c :: !res);
    List.rev !res
  ;;

  let of_char_list ss =
    let res = String.create @@ List.length ss in
    List.iteri ss ~f:(fun i c -> res.[i] <- c);
    res
  ;;

  let iteri ~f a =
    for i = 0 to length a - 1 do f i (unsafe_get a i) done
  ;;
end
;;

module Float = struct
  let (+) = (+.)
  let (-) = (-.)
  let ( * ) = ( *. )
  let (/) = (/.)
end
;;

module Int64 = struct
  include Int64
  let (+) = add
  let (-) = sub
  let ( * ) = mul
  let (/) = div
end
;;

let fold_for ?(skip=1) min max ~init ~f =
  let acc = ref init in
  let cur = ref min in
  while !cur < max do
    acc := f !acc !cur;
    cur := !cur + skip;
  done;
  !acc
;;

let iter_for ?(skip=1) min max ~f =
  let cur = ref min in
  while !cur < max do
    f !cur;
    cur := !cur + skip;
  done
;;

let ss = ['a'; 'i'; 'u'; 'e'; 'o'] ;;

let () =
  let s = Scanf.scanf "%s " ident in
  String.map_to_list ~f:ident s
  |> List.filter ~f:(fun c -> not @@ List.mem c ~set:ss)
  |> String.of_char_list
  |> print_endline
;;

Submission Info

Submission Time
Task B - 罠
User iab
Language OCaml (3.12.1)
Score 100
Code Size 1915 Byte
Status AC
Exec Time 43 ms
Memory 1192 KB

Judge Result

Set Name all
Score / Max Score 100 / 100
Status
AC × 59
Set Name Test Cases
all 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, test_aaaaaaaaaaaaaaaaaaaaaaaaaapaaa.txt, test_abcdefghijklmnopqrstuvwxyz.txt, test_aeuuoeuuooaoikuaouoo.txt, test_aieeuoaoaeioeierrtwmmdkjylcbbj.txt, test_aioeunu.txt, test_aqahahuqugironiyog.txt, test_ay.txt, test_c.txt, test_cizuci.txt, test_clrhrnbnxmhvvrykgpvsjpylvns.txt, test_clwxebedrzlfbey.txt, test_dfiousakzbw.txt, test_di.txt, test_eeeeeleeeeeeeeeeeeeeeeeeeeeeee.txt, test_eugfblf.txt, test_faumfxzsfpgz.txt, test_glpfsryzkcgbkmytzz.txt, test_hzkx.txt, test_iiiiiiiiiiiiiiiiiiiitiiiiiiiii.txt, test_iyenewigoronadomeni.txt, test_joda.txt, test_k.txt, test_kjjxmvpdpcbthjhqqqnsvmvxbtz.txt, test_klaimqrlgrxzgsqkenng.txt, test_mgjpfrkthffctppiueeeouiioeieoa.txt, test_mhfrnzpxkmxjzvmqhwxg.txt, test_mm.txt, test_mvgvrpyghdszgfvznv.txt, test_nu.txt, test_oaiiioieoeiieiuooiueaouuuiw.txt, test_oaqii.txt, test_oit.txt, test_omimujomevadimadom.txt, test_oooooooooolooooooooooooooooooo.txt, test_ooqo.txt, test_ouioiaeiuaoaeiieuuiooeeqo.txt, test_ow.txt, test_pifofawezojisasotuj.txt, test_pn.txt, test_qgqsghgjczftdmvdtrztjdwhcds.txt, test_rxifvbybdsqasoyjdskqwhlstx.txt, test_s.txt, test_taroakpyzmgkbhtklwfbk.txt, test_tkttwgnpjlrkcmwkkcfkjtyb.txt, test_uauoyouaaeoaoeooa.txt, test_uphtuhurtdkmcidxfjtgqtdujblvht.txt, test_uqzghmkf.txt, test_usetumukiwukugekidefupalumimec.txt, test_uueeuoeuviuiieuioeeauuuieeuiee.txt, test_uuueueouaouuiuniaoaaeuaoaa.txt, test_uuuuuuuujuuuuuuuuuuuuuuuuuuuuu.txt, test_vokicozoyatekebagajiceb.txt, test_xlsphqfmqrtrtvmpvbgnkr.txt, test_yepelilemapakonarugupabepisoha.txt, test_zkkyzwjgzmddvqtvvrcqhsrqlmqmkr.txt
Case Name Status Exec Time Memory
00_sample_01.txt AC 43 ms 1108 KB
00_sample_02.txt AC 27 ms 1064 KB
00_sample_03.txt AC 25 ms 1172 KB
00_sample_04.txt AC 26 ms 1124 KB
test_aaaaaaaaaaaaaaaaaaaaaaaaaapaaa.txt AC 26 ms 1064 KB
test_abcdefghijklmnopqrstuvwxyz.txt AC 28 ms 1120 KB
test_aeuuoeuuooaoikuaouoo.txt AC 28 ms 1172 KB
test_aieeuoaoaeioeierrtwmmdkjylcbbj.txt AC 27 ms 1056 KB
test_aioeunu.txt AC 24 ms 1176 KB
test_aqahahuqugironiyog.txt AC 24 ms 1172 KB
test_ay.txt AC 25 ms 1060 KB
test_c.txt AC 24 ms 1052 KB
test_cizuci.txt AC 24 ms 1056 KB
test_clrhrnbnxmhvvrykgpvsjpylvns.txt AC 26 ms 1172 KB
test_clwxebedrzlfbey.txt AC 28 ms 1192 KB
test_dfiousakzbw.txt AC 25 ms 1068 KB
test_di.txt AC 25 ms 1056 KB
test_eeeeeleeeeeeeeeeeeeeeeeeeeeeee.txt AC 25 ms 1064 KB
test_eugfblf.txt AC 24 ms 1176 KB
test_faumfxzsfpgz.txt AC 27 ms 1068 KB
test_glpfsryzkcgbkmytzz.txt AC 24 ms 1172 KB
test_hzkx.txt AC 28 ms 1124 KB
test_iiiiiiiiiiiiiiiiiiiitiiiiiiiii.txt AC 27 ms 1064 KB
test_iyenewigoronadomeni.txt AC 25 ms 1072 KB
test_joda.txt AC 25 ms 1176 KB
test_k.txt AC 27 ms 1068 KB
test_kjjxmvpdpcbthjhqqqnsvmvxbtz.txt AC 26 ms 1056 KB
test_klaimqrlgrxzgsqkenng.txt AC 26 ms 1164 KB
test_mgjpfrkthffctppiueeeouiioeieoa.txt AC 29 ms 1120 KB
test_mhfrnzpxkmxjzvmqhwxg.txt AC 25 ms 1176 KB
test_mm.txt AC 26 ms 1064 KB
test_mvgvrpyghdszgfvznv.txt AC 25 ms 1064 KB
test_nu.txt AC 25 ms 1176 KB
test_oaiiioieoeiieiuooiueaouuuiw.txt AC 24 ms 1172 KB
test_oaqii.txt AC 25 ms 1072 KB
test_oit.txt AC 27 ms 1112 KB
test_omimujomevadimadom.txt AC 25 ms 1188 KB
test_oooooooooolooooooooooooooooooo.txt AC 23 ms 1056 KB
test_ooqo.txt AC 25 ms 1068 KB
test_ouioiaeiuaoaeiieuuiooeeqo.txt AC 26 ms 1172 KB
test_ow.txt AC 25 ms 1056 KB
test_pifofawezojisasotuj.txt AC 23 ms 1172 KB
test_pn.txt AC 26 ms 1060 KB
test_qgqsghgjczftdmvdtrztjdwhcds.txt AC 24 ms 1164 KB
test_rxifvbybdsqasoyjdskqwhlstx.txt AC 25 ms 1172 KB
test_s.txt AC 25 ms 1060 KB
test_taroakpyzmgkbhtklwfbk.txt AC 26 ms 1180 KB
test_tkttwgnpjlrkcmwkkcfkjtyb.txt AC 25 ms 1072 KB
test_uauoyouaaeoaoeooa.txt AC 27 ms 1060 KB
test_uphtuhurtdkmcidxfjtgqtdujblvht.txt AC 26 ms 1064 KB
test_uqzghmkf.txt AC 25 ms 1064 KB
test_usetumukiwukugekidefupalumimec.txt AC 25 ms 1068 KB
test_uueeuoeuviuiieuioeeauuuieeuiee.txt AC 25 ms 1064 KB
test_uuueueouaouuiuniaoaaeuaoaa.txt AC 25 ms 1060 KB
test_uuuuuuuujuuuuuuuuuuuuuuuuuuuuu.txt AC 25 ms 1068 KB
test_vokicozoyatekebagajiceb.txt AC 24 ms 1060 KB
test_xlsphqfmqrtrtvmpvbgnkr.txt AC 24 ms 1172 KB
test_yepelilemapakonarugupabepisoha.txt AC 27 ms 1064 KB
test_zkkyzwjgzmddvqtvvrcqhsrqlmqmkr.txt AC 26 ms 1064 KB