結果
| 問題 | No.2647 [Cherry 6th Tune A] Wind |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-04-03 02:46:51 |
| 言語 | OCaml (5.4.1) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 897 bytes |
| 記録 | |
| コンパイル時間 | 1,889 ms |
| コンパイル使用メモリ | 22,668 KB |
| 実行使用メモリ | 7,972 KB |
| 最終ジャッジ日時 | 2026-04-03 02:47:02 |
| 合計ジャッジ時間 | 2,436 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
| 純コード判定待ち |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 14 |
ソースコード
let read_n_int () =
let temp = read_line () in
let digits = String.split_on_char ' ' temp in
List.map int_of_string digits
let input_data () =
let read_test_case () =
let _d, a = Scanf.sscanf (read_line ()) "%d %d" (fun a b -> (a, b)) in
let x_s = read_n_int () in
(a, x_s)
in
let t = read_int () in
let testcases = List.init t (fun _ -> read_test_case ()) in
testcases
let rec print_int_list l =
match l with
| [] -> ignore ()
| h :: tl ->
print_int h;
if tl = [] then ignore ()
else
(
print_char ' ';
print_int_list tl
)
let () =
let testcases = input_data () in
let ans =
List.map (fun (a, x_s) ->
List.map (fun x ->
(2 * x + a) / (2 * a))
x_s)
testcases in
List.iter
(fun testcase_result ->
print_int_list testcase_result;
print_newline ())
ans