結果
| 問題 | No.1908 Assault for Keys | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2022-07-28 01:05:33 | 
| 言語 | OCaml (5.2.1) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 27 ms / 2,000 ms | 
| コード長 | 372 bytes | 
| コンパイル時間 | 2,284 ms | 
| コンパイル使用メモリ | 21,604 KB | 
| 実行使用メモリ | 6,144 KB | 
| 最終ジャッジ日時 | 2024-07-17 14:49:09 | 
| 合計ジャッジ時間 | 4,389 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 18 | 
ソースコード
Scanf.scanf "%d %d" (fun n m ->
    let s = Array.init n (fun _ -> Scanf.scanf " %s" (fun s -> s)) in
    let rec loop i j cur mm =
        if j = m then mm else
        if i = n then loop 0 (j + 1) 0 (max mm cur) else
            let cur = if s.(i).[j] = 'x' then cur + 1 else cur in
            loop (i + 1) j cur mm
    in
    Printf.printf "%d\n" @@ 1 + loop 0 0 0 0
)
            
            
            
        