結果
問題 |
No.2803 Bocching Star
|
ユーザー |
|
提出日時 | 2024-08-11 14:19:33 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 351 bytes |
コンパイル時間 | 261 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 51,612 KB |
最終ジャッジ日時 | 2024-08-11 14:19:40 |
合計ジャッジ時間 | 7,334 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 35 |
ソースコード
N, S = map(int, input().split()) P = [(i + 1, int(v)) for i, v in enumerate(input().split())] P.sort(lambda x: x[1]) P.insert(0, (0, -S-1)) P.extend((N + 1, P[-1][1]+S+1)) ans = [] for i in range(1, N + 1): if P[i][1]-P[i - 1][1] > S and P[i + 1][1]-P[i][1] > S: ans.append(i) ans.sort() print(len(ans)) print(' '.join(map(str, ans)))