161612025-04-08 12:35:07algoproTűzijátékpypy3Runtime error 36/5079ms32000 KiB
# UUID: a9b8d288-703c-4808-8cb1-81748ce5cffa
N,S,T=map(int,input().split())
A=tuple(map(int,input().split()))
import __pypy__
__pypy__.add_memory_pressure
a=[S]
b=[]
r=1
c=S-1
for i in range(S,N):
 if A[i]-A[c]>=T:
  a+=[i+1]
  c=i
  r+=1
c=S-1
for i in range(S-2,-1,-1):
 if A[c]-A[i]>=T:
  b+=[i+1]
  c=i
  r+=1
print(r)
print(*b[::-1],*a)
SubtaskSumTestVerdictTimeMemory
base36/50
1Accepted0/039ms19552 KiB
2Runtime error0/076ms32000 KiB
3Accepted2/245ms19536 KiB
4Accepted2/245ms19304 KiB
5Accepted2/246ms19428 KiB
6Accepted2/239ms19512 KiB
7Accepted2/241ms19316 KiB
8Accepted2/246ms19528 KiB
9Accepted2/259ms21692 KiB
10Accepted2/264ms22504 KiB
11Accepted2/257ms22184 KiB
12Accepted2/274ms23148 KiB
13Accepted2/263ms23176 KiB
14Accepted2/264ms22600 KiB
15Accepted3/371ms22896 KiB
16Accepted3/375ms25576 KiB
17Accepted3/379ms27108 KiB
18Accepted3/371ms28676 KiB
19Runtime error0/379ms32000 KiB
20Runtime error0/376ms32000 KiB
21Runtime error0/476ms32000 KiB
22Runtime error0/479ms32000 KiB