結果

問題 No.1110 好きな歌
ユーザー trineutrontrineutron
提出日時 2019-10-25 17:10:44
言語 Python2
(2.7.18)
結果
AC  
実行時間 1,656 ms / 5,000 ms
コード長 247 bytes
コンパイル時間 1,151 ms
コンパイル使用メモリ 6,588 KB
実行使用メモリ 43,172 KB
最終ジャッジ日時 2023-10-11 11:43:42
合計ジャッジ時間 38,759 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,060 KB
testcase_01 AC 11 ms
5,968 KB
testcase_02 AC 11 ms
6,204 KB
testcase_03 AC 11 ms
6,148 KB
testcase_04 AC 11 ms
5,972 KB
testcase_05 AC 11 ms
6,204 KB
testcase_06 AC 11 ms
6,000 KB
testcase_07 AC 12 ms
6,044 KB
testcase_08 AC 11 ms
6,052 KB
testcase_09 AC 12 ms
5,972 KB
testcase_10 AC 11 ms
6,040 KB
testcase_11 AC 11 ms
6,156 KB
testcase_12 AC 11 ms
6,100 KB
testcase_13 AC 11 ms
6,004 KB
testcase_14 AC 15 ms
6,032 KB
testcase_15 AC 13 ms
6,184 KB
testcase_16 AC 14 ms
6,108 KB
testcase_17 AC 17 ms
6,144 KB
testcase_18 AC 12 ms
5,964 KB
testcase_19 AC 17 ms
6,216 KB
testcase_20 AC 16 ms
6,064 KB
testcase_21 AC 14 ms
6,044 KB
testcase_22 AC 16 ms
6,132 KB
testcase_23 AC 12 ms
6,032 KB
testcase_24 AC 921 ms
27,624 KB
testcase_25 AC 1,138 ms
32,232 KB
testcase_26 AC 567 ms
19,820 KB
testcase_27 AC 1,125 ms
31,844 KB
testcase_28 AC 627 ms
20,976 KB
testcase_29 AC 1,337 ms
36,508 KB
testcase_30 AC 621 ms
20,656 KB
testcase_31 AC 371 ms
15,020 KB
testcase_32 AC 1,492 ms
39,852 KB
testcase_33 AC 709 ms
22,752 KB
testcase_34 AC 993 ms
29,144 KB
testcase_35 AC 1,549 ms
41,292 KB
testcase_36 AC 152 ms
9,756 KB
testcase_37 AC 401 ms
15,908 KB
testcase_38 AC 1,307 ms
36,376 KB
testcase_39 AC 978 ms
28,572 KB
testcase_40 AC 1,212 ms
33,888 KB
testcase_41 AC 88 ms
8,120 KB
testcase_42 AC 1,400 ms
38,192 KB
testcase_43 AC 1,321 ms
36,140 KB
testcase_44 AC 1,566 ms
41,900 KB
testcase_45 AC 1,628 ms
42,528 KB
testcase_46 AC 1,602 ms
42,268 KB
testcase_47 AC 1,628 ms
43,172 KB
testcase_48 AC 1,632 ms
42,524 KB
testcase_49 AC 1,540 ms
41,012 KB
testcase_50 AC 1,595 ms
42,612 KB
testcase_51 AC 1,597 ms
42,192 KB
testcase_52 AC 1,619 ms
42,708 KB
testcase_53 AC 1,656 ms
43,096 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