結果

問題 No.2803 Bocching Star
ユーザー Basin-BugBasin-Bug
提出日時 2024-07-12 21:40:57
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 377 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 82,440 KB
実行使用メモリ 116,608 KB
最終ジャッジ日時 2024-07-12 21:41:14
合計ジャッジ時間 14,782 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 2 RE * 1
other WA * 35
権限があれば一括ダウンロードができます

ソースコード

diff #

N, S = map(int,input().split())
P = list(map(int, input().split()))

sp = [(P[i], i) for i in range(N)]
sp.sort()

ans = []
if sp[1][0] - sp[0][0] > S:
	ans.append(sp[0][1] + 1)
for i in range(1, N - 1):
	if sp[i + 1][0] - sp[i][0] > S and sp[i][0] - sp[i - 1][0] > S:
		ans.append(sp[i][1] + 1)

if sp[-1][0] - sp[-2][0] > S:
	ans.append(sp[-1][1] + 1)

ans.sort()
print(*ans)
0