結果

問題 No.2803 Bocching Star
ユーザー nouka28nouka28
提出日時 2024-07-12 21:02:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 641 ms / 2,000 ms
コード長 354 bytes
コンパイル時間 1,441 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 116,936 KB
最終ジャッジ日時 2024-07-12 21:03:41
合計ジャッジ時間 16,289 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
51,712 KB
testcase_01 AC 40 ms
51,968 KB
testcase_02 AC 40 ms
51,584 KB
testcase_03 AC 109 ms
78,464 KB
testcase_04 AC 522 ms
105,984 KB
testcase_05 AC 281 ms
92,800 KB
testcase_06 AC 100 ms
77,348 KB
testcase_07 AC 204 ms
85,120 KB
testcase_08 AC 144 ms
81,792 KB
testcase_09 AC 567 ms
108,544 KB
testcase_10 AC 589 ms
105,572 KB
testcase_11 AC 568 ms
105,984 KB
testcase_12 AC 195 ms
83,968 KB
testcase_13 AC 499 ms
103,836 KB
testcase_14 AC 333 ms
95,232 KB
testcase_15 AC 515 ms
106,240 KB
testcase_16 AC 320 ms
92,620 KB
testcase_17 AC 140 ms
79,744 KB
testcase_18 AC 117 ms
78,848 KB
testcase_19 AC 460 ms
103,552 KB
testcase_20 AC 289 ms
92,948 KB
testcase_21 AC 270 ms
88,320 KB
testcase_22 AC 240 ms
87,168 KB
testcase_23 AC 600 ms
105,596 KB
testcase_24 AC 641 ms
116,484 KB
testcase_25 AC 611 ms
112,192 KB
testcase_26 AC 623 ms
113,300 KB
testcase_27 AC 573 ms
105,416 KB
testcase_28 AC 587 ms
108,960 KB
testcase_29 AC 619 ms
105,412 KB
testcase_30 AC 591 ms
113,672 KB
testcase_31 AC 578 ms
105,548 KB
testcase_32 AC 623 ms
116,936 KB
testcase_33 AC 57 ms
66,432 KB
testcase_34 AC 58 ms
66,816 KB
testcase_35 AC 58 ms
65,792 KB
testcase_36 AC 57 ms
66,304 KB
testcase_37 AC 59 ms
66,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,s=map(int,input().split())

p=list(map(int,input().split()))

tp=[(p[i],i)for i in range(n)]
tp.sort()

f=[0]*n

for i in range(n):
    x=0
    if i:
        if abs(tp[i][0]-tp[i-1][0])<=s:x=1
    if i!=n-1:
        if abs(tp[i][0]-tp[i+1][0])<=s:x=1
    if not x:f[tp[i][1]]=1

v=[]
for i in range(n):
    if f[i]:v.append(i+1)
print(len(v))
print(*v)
0