結果

問題 No.1110 好きな歌
ユーザー trineutrontrineutron
提出日時 2019-10-23 09:59:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,144 ms / 5,000 ms
コード長 238 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 42,568 KB
最終ジャッジ日時 2023-10-11 11:22:35
合計ジャッジ時間 27,828 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,892 KB
testcase_01 AC 16 ms
7,924 KB
testcase_02 AC 17 ms
7,924 KB
testcase_03 AC 16 ms
7,968 KB
testcase_04 AC 16 ms
7,928 KB
testcase_05 AC 16 ms
8,036 KB
testcase_06 AC 16 ms
8,000 KB
testcase_07 AC 16 ms
7,916 KB
testcase_08 AC 16 ms
7,968 KB
testcase_09 AC 16 ms
7,968 KB
testcase_10 AC 16 ms
7,888 KB
testcase_11 AC 16 ms
8,000 KB
testcase_12 AC 16 ms
7,872 KB
testcase_13 AC 16 ms
7,912 KB
testcase_14 AC 18 ms
8,064 KB
testcase_15 AC 17 ms
7,868 KB
testcase_16 AC 18 ms
7,920 KB
testcase_17 AC 19 ms
7,916 KB
testcase_18 AC 16 ms
7,872 KB
testcase_19 AC 19 ms
7,892 KB
testcase_20 AC 19 ms
7,932 KB
testcase_21 AC 17 ms
7,972 KB
testcase_22 AC 18 ms
7,940 KB
testcase_23 AC 17 ms
7,920 KB
testcase_24 AC 612 ms
27,608 KB
testcase_25 AC 751 ms
31,436 KB
testcase_26 AC 377 ms
21,016 KB
testcase_27 AC 742 ms
31,388 KB
testcase_28 AC 418 ms
21,416 KB
testcase_29 AC 899 ms
36,252 KB
testcase_30 AC 401 ms
20,712 KB
testcase_31 AC 252 ms
16,276 KB
testcase_32 AC 993 ms
38,744 KB
testcase_33 AC 461 ms
22,052 KB
testcase_34 AC 654 ms
28,280 KB
testcase_35 AC 1,009 ms
37,740 KB
testcase_36 AC 106 ms
11,544 KB
testcase_37 AC 282 ms
17,764 KB
testcase_38 AC 878 ms
36,112 KB
testcase_39 AC 646 ms
29,136 KB
testcase_40 AC 789 ms
31,268 KB
testcase_41 AC 65 ms
10,420 KB
testcase_42 AC 922 ms
35,384 KB
testcase_43 AC 895 ms
35,684 KB
testcase_44 AC 1,024 ms
38,660 KB
testcase_45 AC 1,085 ms
40,748 KB
testcase_46 AC 1,066 ms
40,268 KB
testcase_47 AC 1,125 ms
42,568 KB
testcase_48 AC 1,076 ms
40,688 KB
testcase_49 AC 992 ms
37,092 KB
testcase_50 AC 1,070 ms
40,476 KB
testcase_51 AC 1,039 ms
39,308 KB
testcase_52 AC 1,084 ms
40,688 KB
testcase_53 AC 1,144 ms
42,520 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n, d = map(int, input().split())
a = [(int(input()), i) for i in range(n)]
a.sort()
ans = [0] * n
for i in range(n):
    ans[a[i][1]] = bisect.bisect_left(a, (a[i][0] - d, 2000000000))

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