結果

問題 No.1110 好きな歌
ユーザー U SU S
提出日時 2020-07-10 21:35:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 273 ms / 5,000 ms
コード長 973 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 82,560 KB
実行使用メモリ 84,528 KB
最終ジャッジ日時 2024-04-19 16:00:21
合計ジャッジ時間 9,330 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,096 KB
testcase_01 AC 34 ms
51,840 KB
testcase_02 AC 35 ms
52,352 KB
testcase_03 AC 32 ms
52,224 KB
testcase_04 AC 38 ms
52,224 KB
testcase_05 AC 32 ms
51,968 KB
testcase_06 AC 32 ms
52,224 KB
testcase_07 AC 32 ms
52,224 KB
testcase_08 AC 31 ms
52,096 KB
testcase_09 AC 32 ms
52,480 KB
testcase_10 AC 32 ms
52,204 KB
testcase_11 AC 31 ms
52,224 KB
testcase_12 AC 31 ms
52,480 KB
testcase_13 AC 32 ms
52,352 KB
testcase_14 AC 45 ms
62,208 KB
testcase_15 AC 40 ms
59,648 KB
testcase_16 AC 46 ms
61,696 KB
testcase_17 AC 51 ms
64,256 KB
testcase_18 AC 35 ms
52,608 KB
testcase_19 AC 53 ms
65,664 KB
testcase_20 AC 50 ms
64,128 KB
testcase_21 AC 43 ms
60,544 KB
testcase_22 AC 48 ms
63,232 KB
testcase_23 AC 40 ms
58,880 KB
testcase_24 AC 176 ms
80,672 KB
testcase_25 AC 192 ms
82,016 KB
testcase_26 AC 144 ms
79,360 KB
testcase_27 AC 198 ms
81,756 KB
testcase_28 AC 141 ms
80,508 KB
testcase_29 AC 234 ms
81,732 KB
testcase_30 AC 129 ms
80,008 KB
testcase_31 AC 113 ms
79,416 KB
testcase_32 AC 241 ms
83,392 KB
testcase_33 AC 135 ms
81,024 KB
testcase_34 AC 185 ms
81,292 KB
testcase_35 AC 211 ms
84,520 KB
testcase_36 AC 82 ms
76,996 KB
testcase_37 AC 133 ms
79,472 KB
testcase_38 AC 231 ms
81,988 KB
testcase_39 AC 188 ms
81,624 KB
testcase_40 AC 183 ms
81,984 KB
testcase_41 AC 84 ms
76,488 KB
testcase_42 AC 215 ms
83,908 KB
testcase_43 AC 231 ms
81,988 KB
testcase_44 AC 230 ms
84,136 KB
testcase_45 AC 271 ms
84,008 KB
testcase_46 AC 245 ms
84,392 KB
testcase_47 AC 272 ms
84,016 KB
testcase_48 AC 239 ms
84,008 KB
testcase_49 AC 210 ms
84,528 KB
testcase_50 AC 245 ms
84,140 KB
testcase_51 AC 231 ms
84,524 KB
testcase_52 AC 246 ms
84,012 KB
testcase_53 AC 273 ms
84,388 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