結果

問題 No.1110 好きな歌
ユーザー trineutrontrineutron
提出日時 2019-10-25 17:11:22
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 2,361 ms / 5,000 ms
コード長 247 bytes
コンパイル時間 1,352 ms
コンパイル使用メモリ 77,520 KB
実行使用メモリ 158,404 KB
最終ジャッジ日時 2023-10-11 12:17:46
合計ジャッジ時間 57,616 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
76,344 KB
testcase_01 AC 71 ms
76,540 KB
testcase_02 AC 72 ms
76,540 KB
testcase_03 AC 70 ms
76,540 KB
testcase_04 AC 71 ms
76,772 KB
testcase_05 AC 71 ms
76,460 KB
testcase_06 AC 71 ms
76,728 KB
testcase_07 AC 72 ms
76,852 KB
testcase_08 AC 72 ms
76,604 KB
testcase_09 AC 70 ms
76,508 KB
testcase_10 AC 69 ms
76,344 KB
testcase_11 AC 72 ms
76,396 KB
testcase_12 AC 71 ms
76,588 KB
testcase_13 AC 72 ms
76,656 KB
testcase_14 AC 81 ms
78,468 KB
testcase_15 AC 80 ms
78,280 KB
testcase_16 AC 82 ms
78,072 KB
testcase_17 AC 87 ms
78,516 KB
testcase_18 AC 73 ms
76,548 KB
testcase_19 AC 93 ms
78,860 KB
testcase_20 AC 86 ms
78,528 KB
testcase_21 AC 80 ms
78,244 KB
testcase_22 AC 84 ms
78,332 KB
testcase_23 AC 78 ms
77,788 KB
testcase_24 AC 1,400 ms
125,780 KB
testcase_25 AC 1,702 ms
135,984 KB
testcase_26 AC 915 ms
109,412 KB
testcase_27 AC 1,648 ms
135,892 KB
testcase_28 AC 1,000 ms
112,664 KB
testcase_29 AC 1,904 ms
143,844 KB
testcase_30 AC 1,026 ms
112,980 KB
testcase_31 AC 646 ms
100,416 KB
testcase_32 AC 2,149 ms
150,708 KB
testcase_33 AC 1,130 ms
116,768 KB
testcase_34 AC 1,499 ms
130,492 KB
testcase_35 AC 2,291 ms
157,736 KB
testcase_36 AC 327 ms
89,128 KB
testcase_37 AC 683 ms
102,296 KB
testcase_38 AC 1,867 ms
143,440 KB
testcase_39 AC 1,425 ms
127,036 KB
testcase_40 AC 1,806 ms
141,988 KB
testcase_41 AC 227 ms
84,928 KB
testcase_42 AC 2,103 ms
149,452 KB
testcase_43 AC 1,908 ms
143,520 KB
testcase_44 AC 2,348 ms
158,016 KB
testcase_45 AC 2,295 ms
157,392 KB
testcase_46 AC 2,304 ms
157,920 KB
testcase_47 AC 2,304 ms
157,248 KB
testcase_48 AC 2,278 ms
157,236 KB
testcase_49 AC 2,292 ms
158,404 KB
testcase_50 AC 2,308 ms
157,256 KB
testcase_51 AC 2,361 ms
157,440 KB
testcase_52 AC 2,297 ms
157,280 KB
testcase_53 AC 2,322 ms
157,844 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, d = map(int, raw_input().split())
a = sorted([(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