結果

問題 No.2803 Bocching Star
ユーザー 👑 rin204rin204
提出日時 2024-07-12 21:01:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 223 ms / 2,000 ms
コード長 357 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 82,240 KB
実行使用メモリ 149,816 KB
最終ジャッジ日時 2024-07-12 21:02:26
合計ジャッジ時間 6,995 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
51,456 KB
testcase_01 AC 36 ms
51,456 KB
testcase_02 AC 37 ms
51,456 KB
testcase_03 AC 75 ms
80,768 KB
testcase_04 AC 152 ms
106,328 KB
testcase_05 AC 100 ms
92,416 KB
testcase_06 AC 64 ms
72,064 KB
testcase_07 AC 103 ms
91,904 KB
testcase_08 AC 76 ms
79,232 KB
testcase_09 AC 142 ms
108,544 KB
testcase_10 AC 156 ms
105,812 KB
testcase_11 AC 178 ms
105,984 KB
testcase_12 AC 96 ms
91,648 KB
testcase_13 AC 133 ms
103,224 KB
testcase_14 AC 109 ms
94,848 KB
testcase_15 AC 182 ms
109,716 KB
testcase_16 AC 126 ms
106,624 KB
testcase_17 AC 76 ms
80,640 KB
testcase_18 AC 66 ms
73,216 KB
testcase_19 AC 137 ms
103,296 KB
testcase_20 AC 112 ms
97,536 KB
testcase_21 AC 101 ms
89,600 KB
testcase_22 AC 105 ms
94,464 KB
testcase_23 AC 177 ms
112,956 KB
testcase_24 AC 223 ms
149,816 KB
testcase_25 AC 211 ms
137,308 KB
testcase_26 AC 218 ms
140,804 KB
testcase_27 AC 183 ms
119,548 KB
testcase_28 AC 197 ms
130,044 KB
testcase_29 AC 177 ms
116,344 KB
testcase_30 AC 211 ms
141,700 KB
testcase_31 AC 175 ms
110,464 KB
testcase_32 AC 222 ms
149,428 KB
testcase_33 AC 55 ms
63,872 KB
testcase_34 AC 53 ms
63,872 KB
testcase_35 AC 50 ms
63,616 KB
testcase_36 AC 50 ms
63,232 KB
testcase_37 AC 53 ms
64,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, s = map(int, input().split())
P = list(map(int, input().split()))
Q = sorted(P)
se = set()
for i in range(n):
    ok = True
    if i > 0 and Q[i] - Q[i - 1] <= s:
        ok = False
    if i < n - 1 and Q[i + 1] - Q[i] <= s:
        ok = False
    if ok:
        se.add(Q[i])

ans = [i for i, p in enumerate(P, 1) if p in se]
print(len(ans))
print(*ans)
0