結果

問題 No.1110 好きな歌
ユーザー marroncastlemarroncastle
提出日時 2020-07-10 21:39:29
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 767 ms / 5,000 ms
コード長 248 bytes
コンパイル時間 252 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 27,992 KB
最終ジャッジ日時 2024-04-19 16:21:21
合計ジャッジ時間 19,883 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
10,752 KB
testcase_01 AC 29 ms
10,624 KB
testcase_02 AC 30 ms
10,752 KB
testcase_03 AC 30 ms
10,752 KB
testcase_04 AC 30 ms
10,752 KB
testcase_05 AC 30 ms
10,624 KB
testcase_06 AC 31 ms
10,624 KB
testcase_07 AC 31 ms
10,624 KB
testcase_08 AC 31 ms
10,624 KB
testcase_09 AC 31 ms
10,624 KB
testcase_10 AC 31 ms
10,880 KB
testcase_11 AC 28 ms
10,624 KB
testcase_12 AC 32 ms
10,624 KB
testcase_13 AC 31 ms
10,624 KB
testcase_14 AC 32 ms
10,752 KB
testcase_15 AC 28 ms
10,624 KB
testcase_16 AC 31 ms
10,624 KB
testcase_17 AC 32 ms
10,752 KB
testcase_18 AC 31 ms
10,624 KB
testcase_19 AC 33 ms
10,624 KB
testcase_20 AC 32 ms
10,624 KB
testcase_21 AC 30 ms
10,752 KB
testcase_22 AC 31 ms
10,624 KB
testcase_23 AC 31 ms
10,752 KB
testcase_24 AC 424 ms
19,800 KB
testcase_25 AC 510 ms
21,380 KB
testcase_26 AC 280 ms
17,088 KB
testcase_27 AC 522 ms
21,712 KB
testcase_28 AC 285 ms
16,620 KB
testcase_29 AC 630 ms
24,664 KB
testcase_30 AC 282 ms
15,984 KB
testcase_31 AC 190 ms
14,428 KB
testcase_32 AC 688 ms
25,540 KB
testcase_33 AC 329 ms
16,220 KB
testcase_34 AC 458 ms
19,464 KB
testcase_35 AC 671 ms
23,112 KB
testcase_36 AC 97 ms
11,832 KB
testcase_37 AC 215 ms
15,412 KB
testcase_38 AC 621 ms
24,604 KB
testcase_39 AC 457 ms
21,084 KB
testcase_40 AC 527 ms
20,040 KB
testcase_41 AC 67 ms
11,648 KB
testcase_42 AC 614 ms
22,432 KB
testcase_43 AC 578 ms
23,952 KB
testcase_44 AC 662 ms
24,016 KB
testcase_45 AC 714 ms
26,132 KB
testcase_46 AC 697 ms
25,556 KB
testcase_47 AC 737 ms
27,920 KB
testcase_48 AC 761 ms
25,876 KB
testcase_49 AC 640 ms
21,976 KB
testcase_50 AC 737 ms
25,680 KB
testcase_51 AC 725 ms
24,468 KB
testcase_52 AC 741 ms
25,808 KB
testcase_53 AC 767 ms
27,992 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import *
def solve():
    N, D = map(int, input().split())
    A = [int(input()) for _ in range(N)]
    B = sorted(A)
    ans = [0]*N
    for i in range(N):
        ans[i] = bisect_right(B,A[i]-D)
    return ans
print(*solve(),sep='\n')
0