結果
問題 |
No.1110 好きな歌
|
ユーザー |
|
提出日時 | 2022-04-19 23:25:23 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 264 ms / 5,000 ms |
コード長 | 356 bytes |
コンパイル時間 | 360 ms |
コンパイル使用メモリ | 82,276 KB |
実行使用メモリ | 81,520 KB |
最終ジャッジ日時 | 2025-01-02 18:41:08 |
合計ジャッジ時間 | 11,469 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 51 |
ソースコード
N,D = map(int,input().split()) A = [int(input()) for _ in range(N)] B = A.copy() B.sort() for a in A: x = a - D if B[0] > x: print(0) continue start = 0 end = N while end - start > 1: mid = end + start >> 1 if B[mid] <= x: start = mid else: end = mid print(start + 1)