結果

問題 No.1110 好きな歌
ユーザー simansiman
提出日時 2020-07-26 01:19:26
言語 Ruby
(3.3.0)
結果
AC  
実行時間 700 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 341 ms
コンパイル使用メモリ 11,408 KB
実行使用メモリ 20,284 KB
最終ジャッジ日時 2023-09-10 02:27:18
合計ジャッジ時間 22,174 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
15,260 KB
testcase_01 AC 78 ms
15,284 KB
testcase_02 AC 78 ms
15,264 KB
testcase_03 AC 78 ms
15,280 KB
testcase_04 AC 79 ms
15,148 KB
testcase_05 AC 78 ms
15,204 KB
testcase_06 AC 79 ms
15,136 KB
testcase_07 AC 79 ms
15,076 KB
testcase_08 AC 79 ms
15,244 KB
testcase_09 AC 78 ms
15,236 KB
testcase_10 AC 79 ms
15,196 KB
testcase_11 AC 78 ms
15,152 KB
testcase_12 AC 78 ms
15,012 KB
testcase_13 AC 80 ms
15,348 KB
testcase_14 AC 82 ms
15,144 KB
testcase_15 AC 79 ms
15,248 KB
testcase_16 AC 81 ms
15,072 KB
testcase_17 AC 82 ms
15,076 KB
testcase_18 AC 79 ms
15,020 KB
testcase_19 AC 83 ms
15,032 KB
testcase_20 AC 81 ms
15,160 KB
testcase_21 AC 80 ms
15,212 KB
testcase_22 AC 82 ms
15,144 KB
testcase_23 AC 79 ms
15,308 KB
testcase_24 AC 421 ms
18,372 KB
testcase_25 AC 495 ms
18,760 KB
testcase_26 AC 297 ms
17,044 KB
testcase_27 AC 491 ms
18,860 KB
testcase_28 AC 311 ms
17,220 KB
testcase_29 AC 579 ms
19,424 KB
testcase_30 AC 309 ms
17,368 KB
testcase_31 AC 216 ms
16,436 KB
testcase_32 AC 624 ms
19,540 KB
testcase_33 AC 339 ms
17,496 KB
testcase_34 AC 439 ms
18,164 KB
testcase_35 AC 643 ms
20,108 KB
testcase_36 AC 136 ms
15,808 KB
testcase_37 AC 237 ms
16,472 KB
testcase_38 AC 571 ms
19,052 KB
testcase_39 AC 445 ms
18,288 KB
testcase_40 AC 528 ms
18,960 KB
testcase_41 AC 110 ms
15,552 KB
testcase_42 AC 602 ms
19,772 KB
testcase_43 AC 571 ms
19,124 KB
testcase_44 AC 673 ms
20,100 KB
testcase_45 AC 681 ms
20,284 KB
testcase_46 AC 675 ms
20,100 KB
testcase_47 AC 694 ms
20,120 KB
testcase_48 AC 679 ms
20,140 KB
testcase_49 AC 642 ms
20,004 KB
testcase_50 AC 686 ms
20,236 KB
testcase_51 AC 667 ms
20,096 KB
testcase_52 AC 677 ms
20,144 KB
testcase_53 AC 700 ms
20,256 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

N, D = gets.split.map(&:to_i)
A = N.times.map { gets.to_i }
sorted = A.sort

A.each do |a|
  t = a - D
  idx = sorted.bsearch_index { |x| x >= t + 1 }

  puts idx
end
0