結果

問題 No.1110 好きな歌
ユーザー U SU S
提出日時 2020-07-10 21:35:29
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 299 ms / 5,000 ms
コード長 973 bytes
コンパイル時間 1,390 ms
コンパイル使用メモリ 86,500 KB
実行使用メモリ 86,084 KB
最終ジャッジ日時 2023-08-01 16:44:30
合計ジャッジ時間 13,154 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
70,952 KB
testcase_01 AC 63 ms
71,140 KB
testcase_02 AC 65 ms
71,268 KB
testcase_03 AC 64 ms
71,136 KB
testcase_04 AC 65 ms
71,204 KB
testcase_05 AC 65 ms
71,252 KB
testcase_06 AC 64 ms
71,104 KB
testcase_07 AC 66 ms
71,164 KB
testcase_08 AC 66 ms
71,204 KB
testcase_09 AC 64 ms
71,204 KB
testcase_10 AC 63 ms
71,160 KB
testcase_11 AC 61 ms
71,112 KB
testcase_12 AC 66 ms
71,128 KB
testcase_13 AC 66 ms
71,328 KB
testcase_14 AC 85 ms
75,692 KB
testcase_15 AC 72 ms
75,272 KB
testcase_16 AC 76 ms
75,824 KB
testcase_17 AC 81 ms
75,868 KB
testcase_18 AC 68 ms
71,072 KB
testcase_19 AC 87 ms
75,928 KB
testcase_20 AC 78 ms
75,892 KB
testcase_21 AC 73 ms
75,204 KB
testcase_22 AC 78 ms
75,932 KB
testcase_23 AC 73 ms
75,188 KB
testcase_24 AC 199 ms
81,588 KB
testcase_25 AC 222 ms
82,456 KB
testcase_26 AC 172 ms
80,328 KB
testcase_27 AC 220 ms
82,472 KB
testcase_28 AC 165 ms
81,136 KB
testcase_29 AC 261 ms
82,828 KB
testcase_30 AC 165 ms
80,804 KB
testcase_31 AC 140 ms
80,392 KB
testcase_32 AC 270 ms
84,624 KB
testcase_33 AC 158 ms
82,060 KB
testcase_34 AC 214 ms
81,988 KB
testcase_35 AC 235 ms
85,100 KB
testcase_36 AC 112 ms
78,272 KB
testcase_37 AC 161 ms
80,612 KB
testcase_38 AC 258 ms
83,252 KB
testcase_39 AC 216 ms
81,904 KB
testcase_40 AC 218 ms
82,852 KB
testcase_41 AC 115 ms
77,552 KB
testcase_42 AC 241 ms
84,564 KB
testcase_43 AC 262 ms
82,896 KB
testcase_44 AC 253 ms
85,132 KB
testcase_45 AC 293 ms
84,956 KB
testcase_46 AC 264 ms
85,088 KB
testcase_47 AC 299 ms
85,792 KB
testcase_48 AC 280 ms
84,944 KB
testcase_49 AC 234 ms
86,084 KB
testcase_50 AC 273 ms
84,744 KB
testcase_51 AC 277 ms
85,032 KB
testcase_52 AC 283 ms
85,072 KB
testcase_53 AC 294 ms
85,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# # a,b,c,d = map(int,input().split())
# # if a < b and c > d:
# #     print("YES")
# # else:print("NO")
#
# # n,h = map(int,input().split())
# # a = list(map(int,input().split()))
# # for i in range(n):
# #     a[i] += h
# # print(*a)
#
# n = int(input())
# t = list(map(int,input().split()))
# comb = []
# for i in range(12):
#     u = []
#     u.append(i)
#     u.append((i+2)%12)
#     u.append((i+4)%12)
#     u.append((i+5)%12)
#     u.append((i+7)%12)
#     u.append((i+9)%12)
#     u.append((i+11)%12)
#     comb.append(u)
# ans = []
# for i in range(12):
#     tar = comb[i]
#     flag = True
#     for j in t:
#         if j not in tar:
#             flag = False
#     if flag:
#         ans.append(i)
# if len(ans) == 1:
#     print(ans[0])
# else:
#     print(-1)
#

n,d = map(int,input().split())
a = []
for i in range(n):
    a.append(int(input()))
asort = sorted(a)
import bisect
for i in range(n):
    p = bisect.bisect_right(asort, a[i]-d)
    print(p)


0