結果
問題 |
No.1110 好きな歌
|
ユーザー |
|
提出日時 | 2020-07-10 21:35:29 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 319 ms / 5,000 ms |
コード長 | 973 bytes |
コンパイル時間 | 360 ms |
コンパイル使用メモリ | 81,792 KB |
実行使用メモリ | 84,656 KB |
最終ジャッジ日時 | 2024-10-11 08:06:21 |
合計ジャッジ時間 | 11,081 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 51 |
ソースコード
# # a,b,c,d = map(int,input().split()) # # if a < b and c > d: # # print("YES") # # else:print("NO") # # # n,h = map(int,input().split()) # # a = list(map(int,input().split())) # # for i in range(n): # # a[i] += h # # print(*a) # # n = int(input()) # t = list(map(int,input().split())) # comb = [] # for i in range(12): # u = [] # u.append(i) # u.append((i+2)%12) # u.append((i+4)%12) # u.append((i+5)%12) # u.append((i+7)%12) # u.append((i+9)%12) # u.append((i+11)%12) # comb.append(u) # ans = [] # for i in range(12): # tar = comb[i] # flag = True # for j in t: # if j not in tar: # flag = False # if flag: # ans.append(i) # if len(ans) == 1: # print(ans[0]) # else: # print(-1) # n,d = map(int,input().split()) a = [] for i in range(n): a.append(int(input())) asort = sorted(a) import bisect for i in range(n): p = bisect.bisect_right(asort, a[i]-d) print(p)