結果

問題 No.1110 好きな歌
ユーザー yuruhiyayuruhiya
提出日時 2020-07-11 17:39:49
言語 Crystal
(1.11.2)
結果
AC  
実行時間 96 ms / 5,000 ms
コード長 156 bytes
コンパイル時間 17,530 ms
コンパイル使用メモリ 257,068 KB
実行使用メモリ 10,296 KB
最終ジャッジ日時 2023-09-13 11:09:26
合計ジャッジ時間 26,530 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,376 KB
testcase_01 AC 2 ms
4,496 KB
testcase_02 AC 2 ms
4,512 KB
testcase_03 AC 3 ms
4,384 KB
testcase_04 AC 3 ms
4,380 KB
testcase_05 AC 2 ms
4,400 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 AC 3 ms
4,468 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 3 ms
4,376 KB
testcase_10 AC 2 ms
4,396 KB
testcase_11 AC 2 ms
4,408 KB
testcase_12 AC 2 ms
4,376 KB
testcase_13 AC 3 ms
4,472 KB
testcase_14 AC 3 ms
4,540 KB
testcase_15 AC 3 ms
4,436 KB
testcase_16 AC 2 ms
4,556 KB
testcase_17 AC 3 ms
4,428 KB
testcase_18 AC 3 ms
4,504 KB
testcase_19 AC 3 ms
4,492 KB
testcase_20 AC 3 ms
4,452 KB
testcase_21 AC 3 ms
4,548 KB
testcase_22 AC 3 ms
4,376 KB
testcase_23 AC 2 ms
4,444 KB
testcase_24 AC 50 ms
8,068 KB
testcase_25 AC 60 ms
8,192 KB
testcase_26 AC 35 ms
6,268 KB
testcase_27 AC 61 ms
8,228 KB
testcase_28 AC 33 ms
6,560 KB
testcase_29 AC 78 ms
8,508 KB
testcase_30 AC 29 ms
6,100 KB
testcase_31 AC 21 ms
5,556 KB
testcase_32 AC 83 ms
8,840 KB
testcase_33 AC 31 ms
6,044 KB
testcase_34 AC 48 ms
7,132 KB
testcase_35 AC 68 ms
8,896 KB
testcase_36 AC 9 ms
5,056 KB
testcase_37 AC 26 ms
6,284 KB
testcase_38 AC 77 ms
8,600 KB
testcase_39 AC 57 ms
8,204 KB
testcase_40 AC 53 ms
7,264 KB
testcase_41 AC 7 ms
4,792 KB
testcase_42 AC 66 ms
8,612 KB
testcase_43 AC 73 ms
8,644 KB
testcase_44 AC 73 ms
9,076 KB
testcase_45 AC 86 ms
9,012 KB
testcase_46 AC 81 ms
8,900 KB
testcase_47 AC 96 ms
10,240 KB
testcase_48 AC 83 ms
8,912 KB
testcase_49 AC 63 ms
7,912 KB
testcase_50 AC 83 ms
10,100 KB
testcase_51 AC 77 ms
9,096 KB
testcase_52 AC 84 ms
8,940 KB
testcase_53 AC 96 ms
10,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d = read_line.split.map &.to_i
a = Array.new(n) { read_line.to_i }
b = a.sort
puts a.join('\n') { |ai|
  b.bsearch_index { |bi| ai - bi < d }.not_nil!
}
0