結果

問題 No.1110 好きな歌
ユーザー neterukunneterukun
提出日時 2020-07-10 21:31:36
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 831 ms / 5,000 ms
コード長 255 bytes
コンパイル時間 1,831 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 102,224 KB
最終ジャッジ日時 2023-08-01 16:33:55
合計ジャッジ時間 24,808 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,208 KB
testcase_01 AC 72 ms
71,248 KB
testcase_02 AC 71 ms
71,208 KB
testcase_03 AC 72 ms
70,888 KB
testcase_04 AC 72 ms
71,112 KB
testcase_05 AC 73 ms
71,196 KB
testcase_06 AC 71 ms
70,976 KB
testcase_07 AC 71 ms
71,436 KB
testcase_08 AC 73 ms
71,348 KB
testcase_09 AC 72 ms
71,356 KB
testcase_10 AC 71 ms
71,272 KB
testcase_11 AC 70 ms
71,044 KB
testcase_12 AC 72 ms
71,284 KB
testcase_13 AC 70 ms
71,076 KB
testcase_14 AC 86 ms
75,880 KB
testcase_15 AC 82 ms
75,156 KB
testcase_16 AC 85 ms
75,696 KB
testcase_17 AC 92 ms
75,720 KB
testcase_18 AC 74 ms
71,008 KB
testcase_19 AC 94 ms
76,412 KB
testcase_20 AC 92 ms
75,712 KB
testcase_21 AC 84 ms
75,112 KB
testcase_22 AC 90 ms
75,596 KB
testcase_23 AC 80 ms
75,280 KB
testcase_24 AC 491 ms
91,740 KB
testcase_25 AC 589 ms
94,428 KB
testcase_26 AC 336 ms
86,408 KB
testcase_27 AC 580 ms
94,472 KB
testcase_28 AC 361 ms
87,700 KB
testcase_29 AC 676 ms
97,508 KB
testcase_30 AC 351 ms
87,528 KB
testcase_31 AC 254 ms
84,204 KB
testcase_32 AC 742 ms
99,624 KB
testcase_33 AC 391 ms
89,036 KB
testcase_34 AC 514 ms
93,028 KB
testcase_35 AC 773 ms
102,052 KB
testcase_36 AC 163 ms
79,856 KB
testcase_37 AC 268 ms
84,308 KB
testcase_38 AC 668 ms
97,568 KB
testcase_39 AC 506 ms
92,396 KB
testcase_40 AC 654 ms
96,532 KB
testcase_41 AC 141 ms
79,512 KB
testcase_42 AC 715 ms
99,148 KB
testcase_43 AC 672 ms
97,088 KB
testcase_44 AC 782 ms
101,556 KB
testcase_45 AC 800 ms
101,540 KB
testcase_46 AC 808 ms
102,224 KB
testcase_47 AC 831 ms
101,540 KB
testcase_48 AC 797 ms
101,564 KB
testcase_49 AC 786 ms
102,204 KB
testcase_50 AC 795 ms
101,424 KB
testcase_51 AC 796 ms
101,840 KB
testcase_52 AC 806 ms
101,620 KB
testcase_53 AC 823 ms
102,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect


n, d = map(int, input().split())
a = [[int(input()), i] for i in range(n)]

a = sorted(a)
bi_a = [a[i][0] for i in range(n)]
ans = [0] * n

for val, ind in a:
    ans[ind] = bisect.bisect_right(bi_a, val - d)
for val in ans:
    print(val)
0