94312024-02-21 16:51:45NagyLeoTűzijátékpython3Wrong answer 23/5068ms35260 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 and loc[i]-T <= loc[i+1]:
                continue
            ans.append(N-i)
            last = loc[i]

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

main()
SubtaskSumTestVerdictTimeMemory
base23/50
1Accepted0/017ms11240 KiB
2Wrong answer0/065ms33152 KiB
3Accepted2/217ms11308 KiB
4Accepted2/218ms11684 KiB
5Accepted2/217ms12060 KiB
6Accepted2/217ms12260 KiB
7Wrong answer0/217ms12048 KiB
8Partially correct1/217ms12672 KiB
9Partially correct1/220ms14036 KiB
10Accepted2/221ms14224 KiB
11Wrong answer0/221ms14576 KiB
12Partially correct1/227ms16612 KiB
13Wrong answer0/226ms16732 KiB
14Partially correct1/226ms16764 KiB
15Partially correct1/326ms17244 KiB
16Wrong answer0/332ms19520 KiB
17Partially correct1/337ms21880 KiB
18Accepted3/343ms24820 KiB
19Wrong answer0/368ms34924 KiB
20Wrong answer0/364ms35036 KiB
21Accepted4/468ms35020 KiB
22Wrong answer0/465ms35260 KiB