結果
| 問題 |
No.2803 Bocching Star
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-12 21:10:52 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 844 ms / 2,000 ms |
| コード長 | 297 bytes |
| コンパイル時間 | 1,668 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 44,512 KB |
| 最終ジャッジ日時 | 2024-07-12 21:11:11 |
| 合計ジャッジ時間 | 17,412 ms |
|
ジャッジサーバーID (参考情報) |
judge6 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 35 |
ソースコード
n, s = map(int, input().split())
P = [int(p)for p in input().split()]
Q = []
for i in range(n):
Q.append((P[i], i+1))
Q.sort()
R = []
for i in range(n):
if (i == 0 or Q[i-1][0] < Q[i][0]-s) and (i == n-1 or Q[i][0]+s < Q[i+1][0]):
R.append(Q[i][1])
print(len(R))
print(*sorted(R))