結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
r6eve
|
| 提出日時 | 2017-09-08 23:03:25 |
| 言語 | OCaml (5.5.0) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 441 bytes |
| 記録 | |
| コンパイル時間 | 131 ms |
| コンパイル使用メモリ | 22,656 KB |
| 実行使用メモリ | 6,528 KB |
| 最終ジャッジ日時 | 2026-09-12 07:20:39 |
| 合計ジャッジ時間 | 1,282 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
コンパイルメッセージ
ocamlfind: [WARNING] Cannot read directory ./stublibs which is mentioned in ld.conf
ソースコード
let () =
let h, n = Scanf.scanf "%d %d " (fun h n -> h, n) in
let n = n - 1 in
let a = Array.init n (fun _ -> Scanf.scanf "%d " (fun i -> i)) in
Array.fast_sort (fun x y -> y - x) a;
let rec doit i =
if i = n || h > a.(i) then i + 1
else doit (i + 1) in
let i = doit 0 in
if i = 1 then print_endline "1st"
else if i = 2 then print_endline "2nd"
else if i = 3 then print_endline "3rd"
else Printf.printf "%dth\n" i
r6eve