結果
| 問題 |
No.1110 好きな歌
|
| コンテスト | |
| ユーザー |
convexineq
|
| 提出日時 | 2021-04-11 02:21:59 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 498 ms / 5,000 ms |
| コード長 | 218 bytes |
| コンパイル時間 | 319 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 99,020 KB |
| 最終ジャッジ日時 | 2024-06-26 22:49:26 |
| 合計ジャッジ時間 | 15,346 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 51 |
ソースコード
n,d = map(int,input().split())
a = [(int(input()),i) for i in range(n)]
a.sort(key=lambda x:x[0])
ans = [0]*n
j = 0
for ai,i in a:
while j < n and a[j][0]+d <= ai:
j += 1
ans[i] = j
print(*ans,sep="\n")
convexineq