結果

問題 No.2803 Bocching Star
ユーザー YuuuTYuuuT
提出日時 2024-07-12 21:04:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 750 ms / 2,000 ms
コード長 791 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 82,164 KB
実行使用メモリ 119,044 KB
最終ジャッジ日時 2024-07-12 21:05:11
合計ジャッジ時間 16,995 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
54,472 KB
testcase_01 AC 42 ms
54,876 KB
testcase_02 AC 44 ms
55,736 KB
testcase_03 AC 113 ms
78,928 KB
testcase_04 AC 561 ms
102,036 KB
testcase_05 AC 356 ms
93,624 KB
testcase_06 AC 99 ms
78,056 KB
testcase_07 AC 224 ms
85,892 KB
testcase_08 AC 154 ms
82,220 KB
testcase_09 AC 678 ms
105,592 KB
testcase_10 AC 629 ms
106,656 KB
testcase_11 AC 624 ms
105,108 KB
testcase_12 AC 203 ms
84,632 KB
testcase_13 AC 520 ms
102,236 KB
testcase_14 AC 342 ms
96,428 KB
testcase_15 AC 625 ms
107,636 KB
testcase_16 AC 315 ms
93,260 KB
testcase_17 AC 138 ms
80,792 KB
testcase_18 AC 117 ms
79,604 KB
testcase_19 AC 505 ms
100,344 KB
testcase_20 AC 357 ms
93,816 KB
testcase_21 AC 254 ms
89,268 KB
testcase_22 AC 251 ms
88,004 KB
testcase_23 AC 626 ms
107,908 KB
testcase_24 AC 750 ms
119,044 KB
testcase_25 AC 656 ms
113,940 KB
testcase_26 AC 683 ms
115,100 KB
testcase_27 AC 660 ms
108,452 KB
testcase_28 AC 639 ms
110,356 KB
testcase_29 AC 656 ms
107,900 KB
testcase_30 AC 741 ms
115,828 KB
testcase_31 AC 684 ms
108,032 KB
testcase_32 AC 688 ms
119,032 KB
testcase_33 AC 72 ms
68,840 KB
testcase_34 AC 60 ms
69,060 KB
testcase_35 AC 64 ms
69,468 KB
testcase_36 AC 65 ms
69,640 KB
testcase_37 AC 61 ms
69,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# oj t -c "python3 main.py"
import sys,math
from collections import defaultdict,deque
from itertools import combinations,permutations,accumulate,product
from bisect import bisect_left,bisect_right
from heapq import heappop,heappush,heapify
#from sortedcontainers import SortedList,SortedSet
def input():return sys.stdin.readline().rstrip()
def ii(): return int(input())
def ms(): return map(int, input().split())
def li(): return list(map(int,input().split()))
inf = pow(10,18)
mod = 998244353
#//////////////////////////////////
N,S = ms()
P = li()
P = [(P[i],i+1) for i in range(N)]
ans = list()
P.sort()
for i in range(N):
  if (i!=0 and S>=abs(P[i-1][0]-P[i][0])) or (i!=N-1 and S>=abs(P[i][0]-P[i+1][0])):
    pass
  else:
    ans.append(P[i][1])
print(len(ans))
ans.sort()
print(*ans)
0