結果

問題 No.1110 好きな歌
ユーザー trineutrontrineutron
提出日時 2019-10-24 23:27:00
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 701 ms / 5,000 ms
コード長 248 bytes
コンパイル時間 861 ms
コンパイル使用メモリ 87,308 KB
実行使用メモリ 89,668 KB
最終ジャッジ日時 2023-10-11 11:41:37
合計ジャッジ時間 22,802 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,620 KB
testcase_01 AC 75 ms
71,480 KB
testcase_02 AC 73 ms
71,312 KB
testcase_03 AC 75 ms
71,304 KB
testcase_04 AC 75 ms
71,364 KB
testcase_05 AC 74 ms
71,480 KB
testcase_06 AC 75 ms
71,180 KB
testcase_07 AC 74 ms
71,412 KB
testcase_08 AC 73 ms
71,412 KB
testcase_09 AC 74 ms
71,416 KB
testcase_10 AC 73 ms
71,496 KB
testcase_11 AC 74 ms
71,428 KB
testcase_12 AC 73 ms
71,444 KB
testcase_13 AC 74 ms
71,268 KB
testcase_14 AC 84 ms
75,364 KB
testcase_15 AC 80 ms
71,364 KB
testcase_16 AC 84 ms
75,576 KB
testcase_17 AC 90 ms
75,684 KB
testcase_18 AC 73 ms
71,480 KB
testcase_19 AC 92 ms
75,952 KB
testcase_20 AC 88 ms
75,376 KB
testcase_21 AC 78 ms
71,548 KB
testcase_22 AC 86 ms
75,236 KB
testcase_23 AC 78 ms
71,156 KB
testcase_24 AC 434 ms
84,304 KB
testcase_25 AC 512 ms
85,876 KB
testcase_26 AC 303 ms
82,036 KB
testcase_27 AC 507 ms
85,764 KB
testcase_28 AC 327 ms
82,464 KB
testcase_29 AC 590 ms
86,952 KB
testcase_30 AC 329 ms
82,452 KB
testcase_31 AC 238 ms
80,928 KB
testcase_32 AC 637 ms
88,008 KB
testcase_33 AC 363 ms
83,172 KB
testcase_34 AC 464 ms
84,828 KB
testcase_35 AC 687 ms
89,140 KB
testcase_36 AC 162 ms
79,232 KB
testcase_37 AC 252 ms
80,816 KB
testcase_38 AC 576 ms
87,016 KB
testcase_39 AC 448 ms
85,396 KB
testcase_40 AC 551 ms
86,720 KB
testcase_41 AC 139 ms
78,396 KB
testcase_42 AC 625 ms
87,748 KB
testcase_43 AC 573 ms
86,776 KB
testcase_44 AC 689 ms
89,244 KB
testcase_45 AC 696 ms
89,176 KB
testcase_46 AC 701 ms
89,372 KB
testcase_47 AC 688 ms
88,976 KB
testcase_48 AC 695 ms
89,164 KB
testcase_49 AC 680 ms
89,524 KB
testcase_50 AC 696 ms
89,164 KB
testcase_51 AC 691 ms
89,388 KB
testcase_52 AC 688 ms
89,212 KB
testcase_53 AC 695 ms
89,668 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