243422026-02-09 17:13:41Samiko4321Fasor (40)python3Time limit exceeded 4/40287ms26328 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/016ms3324 KiB
2Time limit exceeded0/0270ms4176 KiB
3Wrong answer0/216ms3300 KiB
4Wrong answer0/214ms3136 KiB
5Wrong answer0/216ms3124 KiB
6Wrong answer0/216ms3108 KiB
7Wrong answer0/217ms3124 KiB
8Wrong answer0/234ms3344 KiB
9Wrong answer0/221ms4264 KiB
10Time limit exceeded0/2287ms4332 KiB
11Wrong answer0/221ms4152 KiB
12Wrong answer0/221ms3892 KiB
13Wrong answer0/276ms14788 KiB
14Wrong answer0/279ms14792 KiB
15Wrong answer0/2131ms25984 KiB
16Wrong answer0/2143ms26092 KiB
17Accepted2/2153ms26328 KiB
18Accepted2/2134ms26328 KiB
19Wrong answer0/2136ms25016 KiB
20Wrong answer0/275ms11084 KiB
21Wrong answer0/2138ms25964 KiB
22Time limit exceeded0/2277ms25040 KiB