結果

問題 No.2803 Bocching Star
ユーザー titiatitia
提出日時 2024-07-12 21:05:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 687 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 1,278 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 44,520 KB
最終ジャッジ日時 2024-07-12 21:06:10
合計ジャッジ時間 14,723 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,624 KB
testcase_01 AC 27 ms
10,496 KB
testcase_02 AC 29 ms
10,624 KB
testcase_03 AC 82 ms
14,208 KB
testcase_04 AC 448 ms
35,868 KB
testcase_05 AC 218 ms
24,092 KB
testcase_06 AC 59 ms
12,928 KB
testcase_07 AC 167 ms
20,428 KB
testcase_08 AC 95 ms
16,036 KB
testcase_09 AC 463 ms
38,252 KB
testcase_10 AC 495 ms
38,928 KB
testcase_11 AC 530 ms
39,216 KB
testcase_12 AC 156 ms
19,328 KB
testcase_13 AC 392 ms
33,876 KB
testcase_14 AC 245 ms
26,552 KB
testcase_15 AC 545 ms
39,088 KB
testcase_16 AC 267 ms
25,712 KB
testcase_17 AC 111 ms
15,520 KB
testcase_18 AC 66 ms
14,480 KB
testcase_19 AC 376 ms
34,236 KB
testcase_20 AC 226 ms
24,876 KB
testcase_21 AC 178 ms
21,712 KB
testcase_22 AC 187 ms
21,916 KB
testcase_23 AC 538 ms
40,468 KB
testcase_24 AC 684 ms
44,364 KB
testcase_25 AC 607 ms
42,956 KB
testcase_26 AC 651 ms
43,464 KB
testcase_27 AC 563 ms
41,212 KB
testcase_28 AC 630 ms
42,264 KB
testcase_29 AC 533 ms
40,648 KB
testcase_30 AC 669 ms
43,596 KB
testcase_31 AC 501 ms
40,108 KB
testcase_32 AC 687 ms
44,520 KB
testcase_33 AC 31 ms
11,008 KB
testcase_34 AC 32 ms
10,880 KB
testcase_35 AC 30 ms
11,008 KB
testcase_36 AC 30 ms
11,008 KB
testcase_37 AC 30 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

PS=[(P[i],i+1) for i in range(N)]
PS.sort()

PS.append((1<<60,0))

ANS=[]

for i in range(N):
    if abs(PS[i][0]-PS[i-1][0])>S and abs(PS[i][0]-PS[i+1][0])>S:
        ANS.append(PS[i][1])

print(len(ANS))
print(*sorted(ANS))

    
0