結果

問題 No.1110 好きな歌
ユーザー brthyyjpbrthyyjp
提出日時 2020-07-10 21:31:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 268 ms / 5,000 ms
コード長 234 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,596 KB
実行使用メモリ 82,940 KB
最終ジャッジ日時 2024-04-19 15:49:09
合計ジャッジ時間 9,750 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,480 KB
testcase_01 AC 38 ms
51,968 KB
testcase_02 AC 35 ms
52,224 KB
testcase_03 AC 35 ms
52,352 KB
testcase_04 AC 35 ms
52,096 KB
testcase_05 AC 35 ms
51,968 KB
testcase_06 AC 36 ms
52,224 KB
testcase_07 AC 35 ms
52,224 KB
testcase_08 AC 36 ms
52,352 KB
testcase_09 AC 34 ms
52,224 KB
testcase_10 AC 36 ms
52,224 KB
testcase_11 AC 35 ms
52,096 KB
testcase_12 AC 36 ms
52,096 KB
testcase_13 AC 35 ms
52,352 KB
testcase_14 AC 49 ms
62,336 KB
testcase_15 AC 44 ms
59,648 KB
testcase_16 AC 49 ms
61,824 KB
testcase_17 AC 54 ms
64,640 KB
testcase_18 AC 37 ms
52,608 KB
testcase_19 AC 55 ms
66,304 KB
testcase_20 AC 52 ms
64,256 KB
testcase_21 AC 47 ms
60,544 KB
testcase_22 AC 52 ms
63,616 KB
testcase_23 AC 43 ms
59,136 KB
testcase_24 AC 179 ms
79,592 KB
testcase_25 AC 195 ms
80,512 KB
testcase_26 AC 141 ms
78,720 KB
testcase_27 AC 199 ms
80,512 KB
testcase_28 AC 146 ms
79,128 KB
testcase_29 AC 238 ms
81,328 KB
testcase_30 AC 133 ms
79,232 KB
testcase_31 AC 112 ms
78,080 KB
testcase_32 AC 245 ms
81,732 KB
testcase_33 AC 141 ms
79,360 KB
testcase_34 AC 192 ms
80,476 KB
testcase_35 AC 224 ms
82,940 KB
testcase_36 AC 88 ms
76,920 KB
testcase_37 AC 125 ms
77,952 KB
testcase_38 AC 234 ms
81,536 KB
testcase_39 AC 195 ms
80,256 KB
testcase_40 AC 187 ms
81,152 KB
testcase_41 AC 88 ms
76,776 KB
testcase_42 AC 217 ms
81,792 KB
testcase_43 AC 246 ms
81,024 KB
testcase_44 AC 232 ms
82,684 KB
testcase_45 AC 267 ms
82,500 KB
testcase_46 AC 247 ms
82,640 KB
testcase_47 AC 268 ms
82,840 KB
testcase_48 AC 248 ms
82,688 KB
testcase_49 AC 210 ms
82,724 KB
testcase_50 AC 252 ms
82,304 KB
testcase_51 AC 246 ms
82,560 KB
testcase_52 AC 250 ms
82,560 KB
testcase_53 AC 268 ms
82,688 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