161592025-04-08 12:23:41algoproTűzijátékpypy3Runtime error 36/5082ms32000 KiB
# UUID: 3518bf89-b614-4739-9e20-14f11f9b5d4c
N,S,T=map(int,input().split())
A=tuple(map(int,input().split()))
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/039ms19416 KiB
2Runtime error0/075ms32000 KiB
3Accepted2/243ms19340 KiB
4Accepted2/239ms19548 KiB
5Accepted2/239ms19360 KiB
6Accepted2/245ms19400 KiB
7Accepted2/239ms19520 KiB
8Accepted2/246ms19688 KiB
9Accepted2/259ms21652 KiB
10Accepted2/256ms22228 KiB
11Accepted2/261ms22348 KiB
12Accepted2/264ms23332 KiB
13Accepted2/263ms23088 KiB
14Accepted2/270ms22648 KiB
15Accepted3/372ms23080 KiB
16Accepted3/365ms25540 KiB
17Accepted3/370ms27124 KiB
18Accepted3/382ms28388 KiB
19Runtime error0/364ms32000 KiB
20Runtime error0/378ms32000 KiB
21Runtime error0/464ms32000 KiB
22Runtime error0/472ms32000 KiB