94292024-02-21 16:31:09NagyLeoTűzijátékpython3Wrong answer 21/5070ms40516 KiB
def main():
    N, S, T = map(int, input().split())
    loc = list(map(int, input().split()))

    target = N-S
    loc = loc[::-1]

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

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

main()
SubtaskSumTestVerdictTimeMemory
base21/50
1Accepted0/017ms11196 KiB
2Wrong answer0/064ms33944 KiB
3Wrong answer0/217ms12500 KiB
4Accepted2/217ms12576 KiB
5Accepted2/217ms12532 KiB
6Accepted2/217ms12740 KiB
7Wrong answer0/217ms13180 KiB
8Partially correct1/218ms13312 KiB
9Partially correct1/220ms14900 KiB
10Accepted2/221ms15568 KiB
11Wrong answer0/221ms15520 KiB
12Partially correct1/226ms17844 KiB
13Wrong answer0/226ms18248 KiB
14Partially correct1/225ms17988 KiB
15Partially correct1/326ms18880 KiB
16Wrong answer0/330ms20784 KiB
17Partially correct1/335ms23372 KiB
18Accepted3/341ms26904 KiB
19Wrong answer0/370ms37912 KiB
20Wrong answer0/365ms38564 KiB
21Accepted4/464ms39448 KiB
22Wrong answer0/461ms40516 KiB