結果
| 問題 | No.1110 好きな歌 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-10 21:57:07 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 209 ms / 5,000 ms |
| コード長 | 182 bytes |
| 記録 | |
| コンパイル時間 | 482 ms |
| コンパイル使用メモリ | 85,248 KB |
| 実行使用メモリ | 86,400 KB |
| 最終ジャッジ日時 | 2026-04-27 16:07:07 |
| 合計ジャッジ時間 | 8,566 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 51 |
ソースコード
import bisect
n, d = map(int, input().split())
A = [int(input()) for _ in range(n)]
A_sorted = sorted(A)
for a in A:
idx = bisect.bisect_right(A_sorted, a - d)
print(idx)