94322024-02-21 17:04:10NagyLeoTűzijátékpython3Wrong answer 24/5064ms35144 KiB
def main():
    N, S, T = map(int, input().split())
    loc = list(map(int, input().split()))

    target = S-1

    ans = [1]
    last = loc[0]
    for i in range(1, N):
        if last+T <= loc[i]:
            if i+1 == target and loc[i]+T > loc[i+1]:
                continue
            ans.append(i+1)
            last = loc[i]

    print(len(ans))
    print(*ans)

main()
SubtaskSumTestVerdictTimeMemory
base24/50
1Accepted0/017ms11336 KiB
2Wrong answer0/064ms33164 KiB
3Accepted2/218ms11760 KiB
4Accepted2/217ms12108 KiB
5Accepted2/217ms12056 KiB
6Accepted2/217ms12124 KiB
7Wrong answer0/218ms12444 KiB
8Accepted2/217ms12596 KiB
9Accepted2/219ms14408 KiB
10Partially correct1/221ms14856 KiB
11Wrong answer0/221ms15132 KiB
12Accepted2/226ms17384 KiB
13Wrong answer0/226ms17052 KiB
14Accepted2/225ms17828 KiB
15Accepted3/326ms17452 KiB
16Wrong answer0/330ms19752 KiB
17Partially correct1/335ms21512 KiB
18Partially correct1/339ms24916 KiB
19Wrong answer0/364ms34840 KiB
20Wrong answer0/364ms35016 KiB
21Partially correct2/463ms34812 KiB
22Wrong answer0/459ms35144 KiB