結果

問題 No.1110 好きな歌
ユーザー stngstng
提出日時 2022-05-22 12:29:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 401 ms / 5,000 ms
コード長 267 bytes
コンパイル時間 167 ms
コンパイル使用メモリ 81,520 KB
実行使用メモリ 103,296 KB
最終ジャッジ日時 2023-10-20 16:56:31
合計ジャッジ時間 16,048 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
55,308 KB
testcase_01 AC 40 ms
55,308 KB
testcase_02 AC 40 ms
55,308 KB
testcase_03 AC 39 ms
55,308 KB
testcase_04 AC 40 ms
55,308 KB
testcase_05 AC 40 ms
55,308 KB
testcase_06 AC 40 ms
55,308 KB
testcase_07 AC 39 ms
55,308 KB
testcase_08 AC 41 ms
55,308 KB
testcase_09 AC 40 ms
55,308 KB
testcase_10 AC 39 ms
55,308 KB
testcase_11 AC 40 ms
55,308 KB
testcase_12 AC 41 ms
55,308 KB
testcase_13 AC 42 ms
55,308 KB
testcase_14 AC 55 ms
63,372 KB
testcase_15 AC 51 ms
60,952 KB
testcase_16 AC 56 ms
63,372 KB
testcase_17 AC 62 ms
67,480 KB
testcase_18 AC 43 ms
55,308 KB
testcase_19 AC 63 ms
68,012 KB
testcase_20 AC 60 ms
67,536 KB
testcase_21 AC 53 ms
63,060 KB
testcase_22 AC 59 ms
65,488 KB
testcase_23 AC 49 ms
61,004 KB
testcase_24 AC 239 ms
89,888 KB
testcase_25 AC 273 ms
92,108 KB
testcase_26 AC 191 ms
84,300 KB
testcase_27 AC 271 ms
91,792 KB
testcase_28 AC 191 ms
85,412 KB
testcase_29 AC 323 ms
93,528 KB
testcase_30 AC 168 ms
84,584 KB
testcase_31 AC 145 ms
81,604 KB
testcase_32 AC 348 ms
98,340 KB
testcase_33 AC 184 ms
85,696 KB
testcase_34 AC 238 ms
88,016 KB
testcase_35 AC 309 ms
95,196 KB
testcase_36 AC 100 ms
78,992 KB
testcase_37 AC 157 ms
82,968 KB
testcase_38 AC 326 ms
92,948 KB
testcase_39 AC 255 ms
88,844 KB
testcase_40 AC 246 ms
89,648 KB
testcase_41 AC 100 ms
77,364 KB
testcase_42 AC 288 ms
93,356 KB
testcase_43 AC 301 ms
94,144 KB
testcase_44 AC 321 ms
98,200 KB
testcase_45 AC 360 ms
102,112 KB
testcase_46 AC 351 ms
99,100 KB
testcase_47 AC 382 ms
102,380 KB
testcase_48 AC 350 ms
101,852 KB
testcase_49 AC 291 ms
95,000 KB
testcase_50 AC 351 ms
101,588 KB
testcase_51 AC 328 ms
98,232 KB
testcase_52 AC 355 ms
101,916 KB
testcase_53 AC 401 ms
103,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect
from collections import defaultdict
n,D = map(int,input().split())
a = [int(input()) for i in range(n)]

ac = a[:]
ac.sort()

d = defaultdict(int)

for i in range(n):
    d[ac[i]] = bisect.bisect_right(ac,ac[i]-D)

for i in range(n):
    print(d[a[i]])
0