結果

問題 No.2803 Bocching Star
ユーザー anonymouslyanonymously
提出日時 2024-07-12 21:10:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
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
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,752 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 28 ms
10,624 KB
testcase_03 AC 89 ms
14,452 KB
testcase_04 AC 499 ms
36,172 KB
testcase_05 AC 224 ms
24,332 KB
testcase_06 AC 59 ms
13,312 KB
testcase_07 AC 186 ms
20,500 KB
testcase_08 AC 102 ms
16,212 KB
testcase_09 AC 474 ms
38,456 KB
testcase_10 AC 550 ms
39,456 KB
testcase_11 AC 581 ms
39,424 KB
testcase_12 AC 187 ms
19,600 KB
testcase_13 AC 402 ms
34,128 KB
testcase_14 AC 289 ms
26,656 KB
testcase_15 AC 610 ms
39,124 KB
testcase_16 AC 337 ms
26,064 KB
testcase_17 AC 106 ms
15,556 KB
testcase_18 AC 75 ms
14,384 KB
testcase_19 AC 451 ms
34,640 KB
testcase_20 AC 313 ms
25,004 KB
testcase_21 AC 207 ms
21,924 KB
testcase_22 AC 228 ms
22,164 KB
testcase_23 AC 629 ms
40,428 KB
testcase_24 AC 748 ms
44,392 KB
testcase_25 AC 747 ms
43,076 KB
testcase_26 AC 760 ms
43,620 KB
testcase_27 AC 659 ms
41,172 KB
testcase_28 AC 667 ms
42,324 KB
testcase_29 AC 676 ms
40,804 KB
testcase_30 AC 793 ms
43,752 KB
testcase_31 AC 588 ms
40,224 KB
testcase_32 AC 844 ms
44,512 KB
testcase_33 AC 34 ms
11,136 KB
testcase_34 AC 35 ms
11,008 KB
testcase_35 AC 34 ms
11,136 KB
testcase_36 AC 35 ms
11,008 KB
testcase_37 AC 34 ms
11,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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))
0