164912025-05-03 18:18:05algoproFasor (40)pypy3Runtime error 20/40300ms64000 KiB
# UUID: 0a9ecdf5-dd9f-40b8-96d6-15f8ebb0f473
n,k=[int(x) for x in input().split()]
h=[int(x) for x in input().split()]
j=-1
for i in range(n):
    if h[i]==max(h[max(i-k,0):min(i+k+1,n)]):
        j=i+1
        break
print(j)
SubtaskSumTestVerdictTimeMemory
base20/40
1Accepted0/039ms19284 KiB
2Accepted0/050ms21588 KiB
3Accepted2/239ms19364 KiB
4Accepted2/243ms19436 KiB
5Accepted2/239ms19448 KiB
6Accepted2/246ms19404 KiB
7Accepted2/239ms19696 KiB
8Accepted2/259ms21440 KiB
9Accepted2/246ms21464 KiB
10Accepted2/248ms21420 KiB
11Accepted2/256ms21588 KiB
12Accepted2/252ms21608 KiB
13Runtime error0/2100ms64000 KiB
14Runtime error0/298ms64000 KiB
15Runtime error0/2126ms64000 KiB
16Runtime error0/2123ms64000 KiB
17Runtime error0/2123ms64000 KiB
18Runtime error0/2108ms64000 KiB
19Time limit exceeded0/2300ms64000 KiB
20Runtime error0/2111ms64000 KiB
21Runtime error0/2107ms64000 KiB
22Runtime error0/2123ms64000 KiB