結果

問題 No.1110 好きな歌
ユーザー trineutrontrineutron
提出日時 2019-10-24 23:26:26
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 998 ms / 5,000 ms
コード長 248 bytes
コンパイル時間 599 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 39,428 KB
最終ジャッジ日時 2023-10-11 11:39:18
合計ジャッジ時間 24,355 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,836 KB
testcase_01 AC 16 ms
7,812 KB
testcase_02 AC 16 ms
7,916 KB
testcase_03 AC 15 ms
7,912 KB
testcase_04 AC 15 ms
7,844 KB
testcase_05 AC 15 ms
7,808 KB
testcase_06 AC 15 ms
7,856 KB
testcase_07 AC 15 ms
7,776 KB
testcase_08 AC 15 ms
7,816 KB
testcase_09 AC 16 ms
7,968 KB
testcase_10 AC 15 ms
7,916 KB
testcase_11 AC 15 ms
7,852 KB
testcase_12 AC 15 ms
7,856 KB
testcase_13 AC 16 ms
7,820 KB
testcase_14 AC 17 ms
7,772 KB
testcase_15 AC 16 ms
7,984 KB
testcase_16 AC 17 ms
7,812 KB
testcase_17 AC 18 ms
8,344 KB
testcase_18 AC 16 ms
7,896 KB
testcase_19 AC 18 ms
8,284 KB
testcase_20 AC 18 ms
8,368 KB
testcase_21 AC 17 ms
7,928 KB
testcase_22 AC 18 ms
8,292 KB
testcase_23 AC 16 ms
7,808 KB
testcase_24 AC 544 ms
26,196 KB
testcase_25 AC 682 ms
30,140 KB
testcase_26 AC 331 ms
19,812 KB
testcase_27 AC 661 ms
29,740 KB
testcase_28 AC 373 ms
20,588 KB
testcase_29 AC 798 ms
33,904 KB
testcase_30 AC 366 ms
20,140 KB
testcase_31 AC 217 ms
15,840 KB
testcase_32 AC 887 ms
36,352 KB
testcase_33 AC 402 ms
22,056 KB
testcase_34 AC 579 ms
27,316 KB
testcase_35 AC 874 ms
37,212 KB
testcase_36 AC 90 ms
11,424 KB
testcase_37 AC 239 ms
16,736 KB
testcase_38 AC 770 ms
33,452 KB
testcase_39 AC 588 ms
27,020 KB
testcase_40 AC 688 ms
31,292 KB
testcase_41 AC 59 ms
10,096 KB
testcase_42 AC 795 ms
34,652 KB
testcase_43 AC 770 ms
33,548 KB
testcase_44 AC 919 ms
37,596 KB
testcase_45 AC 979 ms
38,788 KB
testcase_46 AC 925 ms
38,440 KB
testcase_47 AC 955 ms
39,428 KB
testcase_48 AC 951 ms
38,356 KB
testcase_49 AC 853 ms
37,412 KB
testcase_50 AC 952 ms
38,412 KB
testcase_51 AC 940 ms
37,904 KB
testcase_52 AC 962 ms
38,536 KB
testcase_53 AC 998 ms
39,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d = map(int, input().split())
a = sorted([(int(input()), i) for i in range(n)])
ans = [0] * n
index = 0

for i in range(n):
    while (a[i][0] - a[index][0] >= d): index = index + 1
    ans[a[i][1]] = index

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