結果

問題 No.1110 好きな歌
ユーザー brthyyjpbrthyyjp
提出日時 2020-07-10 21:31:35
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 303 ms / 5,000 ms
コード長 234 bytes
コンパイル時間 1,155 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 83,940 KB
最終ジャッジ日時 2023-08-01 16:32:07
合計ジャッジ時間 12,935 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 70 ms
71,248 KB
testcase_01 AC 70 ms
71,112 KB
testcase_02 AC 71 ms
71,080 KB
testcase_03 AC 71 ms
71,276 KB
testcase_04 AC 71 ms
71,128 KB
testcase_05 AC 71 ms
71,052 KB
testcase_06 AC 70 ms
70,980 KB
testcase_07 AC 70 ms
71,084 KB
testcase_08 AC 70 ms
71,008 KB
testcase_09 AC 69 ms
71,140 KB
testcase_10 AC 70 ms
71,000 KB
testcase_11 AC 69 ms
71,360 KB
testcase_12 AC 70 ms
71,140 KB
testcase_13 AC 69 ms
71,084 KB
testcase_14 AC 82 ms
75,672 KB
testcase_15 AC 78 ms
75,060 KB
testcase_16 AC 83 ms
75,696 KB
testcase_17 AC 88 ms
75,728 KB
testcase_18 AC 70 ms
71,220 KB
testcase_19 AC 90 ms
75,976 KB
testcase_20 AC 89 ms
75,788 KB
testcase_21 AC 82 ms
75,088 KB
testcase_22 AC 86 ms
75,736 KB
testcase_23 AC 77 ms
75,284 KB
testcase_24 AC 213 ms
80,528 KB
testcase_25 AC 229 ms
81,176 KB
testcase_26 AC 176 ms
79,768 KB
testcase_27 AC 233 ms
81,516 KB
testcase_28 AC 173 ms
80,064 KB
testcase_29 AC 271 ms
82,264 KB
testcase_30 AC 166 ms
79,960 KB
testcase_31 AC 146 ms
78,768 KB
testcase_32 AC 276 ms
82,804 KB
testcase_33 AC 171 ms
80,120 KB
testcase_34 AC 227 ms
81,000 KB
testcase_35 AC 257 ms
83,548 KB
testcase_36 AC 122 ms
78,360 KB
testcase_37 AC 159 ms
78,604 KB
testcase_38 AC 267 ms
82,212 KB
testcase_39 AC 226 ms
80,768 KB
testcase_40 AC 219 ms
81,952 KB
testcase_41 AC 118 ms
77,816 KB
testcase_42 AC 244 ms
82,508 KB
testcase_43 AC 267 ms
81,680 KB
testcase_44 AC 262 ms
83,224 KB
testcase_45 AC 300 ms
83,188 KB
testcase_46 AC 276 ms
83,464 KB
testcase_47 AC 302 ms
83,008 KB
testcase_48 AC 286 ms
83,196 KB
testcase_49 AC 245 ms
83,940 KB
testcase_50 AC 281 ms
83,192 KB
testcase_51 AC 268 ms
83,228 KB
testcase_52 AC 282 ms
83,408 KB
testcase_53 AC 303 ms
83,488 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d = map(int, input().split())
A = [int(input()) for i in range(n)]
B = sorted(A)
ans = [0]*n
import bisect
for i, a in enumerate(A):
    b = a-d
    j = bisect.bisect_right(B, b)
    ans[i] = j
for i in range(n):
    print(ans[i])
0