xavierm02

Untitled

Oct 20th, 2012
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
OCaml 0.42 KB | None | 0 0
  1. let id = fun x -> x;;
  2.  
  3. let have_one_whole_in_common = function
  4.     x -> print_int(1);;1 (* TODO *)
  5. ;;
  6.  
  7. let _ =
  8.     let n = Scanf.scanf "%d " id in
  9.     let m = Scanf.scanf "%d " id in
  10.     let pins = Array.init n (fun _ ->
  11.         Array.init m (fun _ ->
  12.             Scanf.scanf "%c" ( function
  13.                 'o' -> 1
  14.                 | _ -> 0
  15.             )
  16.         )
  17.     ) in
  18.     have_one_whole_in_common pins;;
Advertisement
Add Comment
Please, Sign In to add comment