161622025-04-08 12:37:40algoproTűzijátékpypy3Runtime error 36/5085ms32000 KiB
# UUID: 0476cdbd-ce66-43b5-b940-f4bbfbc82333
N,S,T=map(int,input().split())
A=tuple(map(int,input().split()))
import __pypy__
__pypy__.add_memory_pressure(32505856)
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/045ms19372 KiB
2Runtime error0/075ms32000 KiB
3Accepted2/239ms19356 KiB
4Accepted2/241ms19352 KiB
5Accepted2/239ms19424 KiB
6Accepted2/239ms19408 KiB
7Accepted2/246ms19436 KiB
8Accepted2/246ms19692 KiB
9Accepted2/259ms21476 KiB
10Accepted2/257ms22248 KiB
11Accepted2/263ms22244 KiB
12Accepted2/264ms23252 KiB
13Accepted2/271ms23304 KiB
14Accepted2/271ms22864 KiB
15Accepted3/364ms23016 KiB
16Accepted3/368ms25544 KiB
17Accepted3/371ms27108 KiB
18Accepted3/385ms28676 KiB
19Runtime error0/374ms32000 KiB
20Runtime error0/367ms32000 KiB
21Runtime error0/465ms32000 KiB
22Runtime error0/467ms32000 KiB