112942024-08-04 13:31:14probaTűzijátékpython3Wrong answer 12/5082ms14960 KiB
sor = list(map(int, input().split(' ')))
t, th, tav = sor[0], sor[1], sor[2]
tt= list(map(int, input().split(' ')))
'''4
1 3 4 6'''
tp, tjatek = th-1, []
for i in range(th-1, -1, -1):
    if tt[tp] - tt[i] >= tav:
        tjatek += [i+1]
        tp = i
for i in range(th+1, t):
    if tt[i] - tt[tp] >= tav:
        tjatek += [i+1]
        tp = i

tjatek += [th]
tjatek.sort()
print(len(tjatek))
print(*tjatek)



SubtaskSumTestVerdictTimeMemory
base12/50
1Accepted0/018ms3008 KiB
2Wrong answer0/081ms14756 KiB
3Wrong answer0/218ms3048 KiB
4Accepted2/218ms2960 KiB
5Accepted2/217ms3088 KiB
6Accepted2/218ms3044 KiB
7Accepted2/217ms3044 KiB
8Wrong answer0/217ms2972 KiB
9Wrong answer0/223ms3728 KiB
10Partially correct1/223ms4196 KiB
11Wrong answer0/223ms4332 KiB
12Wrong answer0/228ms5272 KiB
13Wrong answer0/229ms5328 KiB
14Wrong answer0/229ms5240 KiB
15Wrong answer0/328ms5500 KiB
16Wrong answer0/337ms6588 KiB
17Wrong answer0/341ms7772 KiB
18Partially correct1/350ms9200 KiB
19Wrong answer0/382ms14960 KiB
20Wrong answer0/376ms14820 KiB
21Partially correct2/482ms14852 KiB
22Wrong answer0/476ms14880 KiB