結果

問題 No.504 ゲーム大会(ランキング)
ユーザー r6eve
提出日時 2017-08-17 12:31:47
言語 OCaml
(5.2.1)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 283 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 20,980 KB
実行使用メモリ 5,504 KB
最終ジャッジ日時 2024-10-09 00:25:09
合計ジャッジ時間 2,638 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

let () =
  let n = read_int () in
  let a = read_int () in
  print_endline "1";
  let rec doit i s =
    if i = n then ()
    else begin
      let x = read_int () in
      let s = if a >= x then s else s + 1 in
      Printf.printf "%d\n" s;
      doit (i + 1) s
    end in
  doit 1 1
0