結果
問題 | No.486 3 Straight Win(3連勝) |
ユーザー |
|
提出日時 | 2020-06-17 12:13:35 |
言語 | OCaml (5.2.1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 356 bytes |
コンパイル時間 | 300 ms |
コンパイル使用メモリ | 20,724 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-09 01:22:29 |
合計ジャッジ時間 | 1,267 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 28 |
ソースコード
let () =let rec search (e,w) lst =match lst with| [] -> "NA"| f :: r ->if f = "O" && e = 2 then "East"else if f = "X" && w = 2 then "West"else if f = "O" then search (e+1,0) relse search (0,w+1) r inlet s = read_line () inlet lst = Str.split (Str.regexp "") s inPrintf.printf "%s\n" (search (0,0) lst)