243432026-02-09 17:14:28Samiko4321Fasor (40)python3Time limit exceeded 4/40300ms26332 KiB
N,K = map(int,input().split())
H = list(map(int,input().split()))
jofahely = []
jofa = []
for fa in range(N):
    if H[fa-1] - H[fa] >= K:
        if H[fa-1] not in jofa:
            jofa.append(H[fa-1])
            jofahely.append(fa-1)
    elif H[fa] - H[fa-1] >= K:
        if H[fa] not in jofa:
            jofa.append(H[fa])
            jofahely.append(fa)
for hely in range(len(jofahely)):
    if jofahely[hely] - jofahely[hely-1] > K:
        print(jofahely[hely-1]+1)
SubtaskSumTestVerdictTimeMemory
base4/40
1Accepted0/016ms3320 KiB
2Time limit exceeded0/0270ms4232 KiB
3Wrong answer0/216ms3124 KiB
4Wrong answer0/216ms3124 KiB
5Wrong answer0/217ms3124 KiB
6Wrong answer0/216ms3132 KiB
7Wrong answer0/217ms3124 KiB
8Wrong answer0/235ms3216 KiB
9Wrong answer0/220ms4148 KiB
10Time limit exceeded0/2300ms4180 KiB
11Wrong answer0/223ms4256 KiB
12Wrong answer0/220ms3892 KiB
13Wrong answer0/282ms14768 KiB
14Wrong answer0/275ms14536 KiB
15Wrong answer0/2138ms25980 KiB
16Wrong answer0/2136ms25964 KiB
17Accepted2/2135ms26332 KiB
18Accepted2/2160ms26292 KiB
19Wrong answer0/2136ms24888 KiB
20Wrong answer0/271ms11068 KiB
21Wrong answer0/2152ms26148 KiB
22Time limit exceeded0/2284ms25036 KiB