結果

問題 No.504 ゲーム大会(ランキング)
ユーザー xsdxsd
提出日時 2020-06-18 23:45:39
言語 OCaml
(5.1.0)
結果
AC  
実行時間 52 ms / 2,000 ms
コード長 349 bytes
コンパイル時間 273 ms
コンパイル使用メモリ 21,576 KB
実行使用メモリ 6,528 KB
最終ジャッジ日時 2024-04-17 09:00:03
合計ジャッジ時間 1,691 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 2 ms
5,376 KB
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 52 ms
6,528 KB
testcase_08 AC 52 ms
6,528 KB
testcase_09 AC 51 ms
6,528 KB
testcase_10 AC 49 ms
6,528 KB
testcase_11 AC 51 ms
6,400 KB
testcase_12 AC 44 ms
6,400 KB
testcase_13 AC 45 ms
6,528 KB
testcase_14 AC 50 ms
6,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Scanf.scanf "%d" (fun n ->
    let a = Array.init n (fun _ -> Scanf.scanf " %d" (fun a -> a)) in
    let rec loop i k =
        if i < n then (
            let k = if i = 0 then 1 else
                    if a.(i) > a.(0) then k + 1 else k
            in
            Printf.printf "%d\n" k;
            loop (i + 1) k
        )
    in
    loop 0 0
)
0