結果

問題 No.1110 好きな歌
ユーザー uni_pythonuni_python
提出日時 2020-07-11 15:38:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 705 ms / 5,000 ms
コード長 531 bytes
コンパイル時間 524 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 88,832 KB
最終ジャッジ日時 2024-04-21 05:06:28
合計ジャッジ時間 19,677 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,608 KB
testcase_01 AC 38 ms
51,840 KB
testcase_02 AC 38 ms
52,352 KB
testcase_03 AC 38 ms
52,260 KB
testcase_04 AC 46 ms
51,712 KB
testcase_05 AC 40 ms
52,224 KB
testcase_06 AC 40 ms
52,224 KB
testcase_07 AC 40 ms
51,968 KB
testcase_08 AC 40 ms
51,712 KB
testcase_09 AC 41 ms
52,096 KB
testcase_10 AC 40 ms
52,352 KB
testcase_11 AC 39 ms
51,712 KB
testcase_12 AC 39 ms
52,608 KB
testcase_13 AC 39 ms
51,968 KB
testcase_14 AC 49 ms
60,928 KB
testcase_15 AC 47 ms
59,392 KB
testcase_16 AC 51 ms
60,544 KB
testcase_17 AC 54 ms
62,848 KB
testcase_18 AC 38 ms
52,096 KB
testcase_19 AC 52 ms
63,488 KB
testcase_20 AC 55 ms
62,336 KB
testcase_21 AC 54 ms
59,904 KB
testcase_22 AC 54 ms
61,952 KB
testcase_23 AC 46 ms
59,392 KB
testcase_24 AC 414 ms
83,616 KB
testcase_25 AC 521 ms
84,220 KB
testcase_26 AC 284 ms
80,844 KB
testcase_27 AC 516 ms
84,304 KB
testcase_28 AC 304 ms
82,176 KB
testcase_29 AC 568 ms
86,792 KB
testcase_30 AC 290 ms
81,556 KB
testcase_31 AC 209 ms
79,260 KB
testcase_32 AC 635 ms
87,132 KB
testcase_33 AC 320 ms
81,776 KB
testcase_34 AC 429 ms
83,860 KB
testcase_35 AC 656 ms
88,084 KB
testcase_36 AC 121 ms
77,568 KB
testcase_37 AC 225 ms
78,976 KB
testcase_38 AC 574 ms
86,292 KB
testcase_39 AC 435 ms
83,564 KB
testcase_40 AC 522 ms
86,208 KB
testcase_41 AC 101 ms
76,868 KB
testcase_42 AC 604 ms
87,052 KB
testcase_43 AC 561 ms
86,160 KB
testcase_44 AC 662 ms
88,352 KB
testcase_45 AC 677 ms
88,480 KB
testcase_46 AC 674 ms
88,832 KB
testcase_47 AC 687 ms
88,352 KB
testcase_48 AC 690 ms
88,224 KB
testcase_49 AC 645 ms
88,736 KB
testcase_50 AC 673 ms
87,972 KB
testcase_51 AC 666 ms
88,228 KB
testcase_52 AC 693 ms
88,348 KB
testcase_53 AC 705 ms
88,604 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input=sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,D=MI()
    A=[]
    for i in range(N):
        a=I()
        A.append((a,i))
        
    import bisect
    A.sort()
    ans=[0]*N
    
    for i in range(N):
        aa=A[i]
        t=(aa[0]-D,N)
        num = bisect.bisect_right(A,t)
        ans[aa[1]]=num
        
    for i in range(N):
        print(ans[i])
        
        


main()
0