結果

問題 No.2803 Bocching Star
ユーザー rlangevinrlangevin
提出日時 2024-07-12 21:02:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 655 ms / 2,000 ms
コード長 359 bytes
コンパイル時間 358 ms
コンパイル使用メモリ 82,288 KB
実行使用メモリ 118,336 KB
最終ジャッジ日時 2024-07-12 21:03:54
合計ジャッジ時間 15,595 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,096 KB
testcase_01 AC 37 ms
51,840 KB
testcase_02 AC 37 ms
52,096 KB
testcase_03 AC 110 ms
78,336 KB
testcase_04 AC 492 ms
103,936 KB
testcase_05 AC 276 ms
98,728 KB
testcase_06 AC 89 ms
77,312 KB
testcase_07 AC 243 ms
88,320 KB
testcase_08 AC 143 ms
82,944 KB
testcase_09 AC 553 ms
107,136 KB
testcase_10 AC 579 ms
117,208 KB
testcase_11 AC 547 ms
104,192 KB
testcase_12 AC 199 ms
86,828 KB
testcase_13 AC 537 ms
102,912 KB
testcase_14 AC 369 ms
102,016 KB
testcase_15 AC 611 ms
104,320 KB
testcase_16 AC 316 ms
97,408 KB
testcase_17 AC 131 ms
81,024 KB
testcase_18 AC 113 ms
79,232 KB
testcase_19 AC 469 ms
102,656 KB
testcase_20 AC 312 ms
98,944 KB
testcase_21 AC 246 ms
92,800 KB
testcase_22 AC 238 ms
90,752 KB
testcase_23 AC 623 ms
117,648 KB
testcase_24 AC 650 ms
118,028 KB
testcase_25 AC 655 ms
117,840 KB
testcase_26 AC 611 ms
117,384 KB
testcase_27 AC 621 ms
117,872 KB
testcase_28 AC 605 ms
117,776 KB
testcase_29 AC 626 ms
118,336 KB
testcase_30 AC 624 ms
117,264 KB
testcase_31 AC 618 ms
117,692 KB
testcase_32 AC 630 ms
117,940 KB
testcase_33 AC 56 ms
66,048 KB
testcase_34 AC 57 ms
66,432 KB
testcase_35 AC 55 ms
65,280 KB
testcase_36 AC 57 ms
65,920 KB
testcase_37 AC 60 ms
65,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, S = map(int, input().split())
P = list(map(int, input().split()))
inf = 10 ** 18
L = [(-inf, 0)]
for i in range(N):
    L.append((P[i], i + 1))
L.append((inf, N + 1))
L.sort()
ans = []
for i in range(1, N + 1):
    if abs(L[i][0] - L[i-1][0]) > S and abs(L[i][0] - L[i+1][0]) > S:
        ans.append(L[i][1])
        
ans.sort()
print(len(ans))
print(*ans)
0