164962025-05-03 18:47:12algoproFasor (40)pypy3Wrong answer 12/4093ms44188 KiB
# UUID: 383e86ec-ebab-4e4d-9405-886c6803aec1
n,k=[int(x) for x in input().split()]
h=[int(x) for x in input().split()]
i=0

futas=True
while futas:
    futas=False
    for j in range(k):
        if i+j+1>=n:
            
            break
        if h[i+j+1]>=h[i]:
            i=i+j+1
            futas=True


print(i+1)
SubtaskSumTestVerdictTimeMemory
base12/40
1Wrong answer0/043ms19408 KiB
2Wrong answer0/056ms21468 KiB
3Wrong answer0/239ms19400 KiB
4Accepted2/239ms19448 KiB
5Wrong answer0/245ms19584 KiB
6Accepted2/245ms19440 KiB
7Wrong answer0/241ms19720 KiB
8Accepted2/246ms21396 KiB
9Accepted2/252ms21376 KiB
10Accepted2/246ms21404 KiB
11Wrong answer0/252ms21304 KiB
12Wrong answer0/248ms21580 KiB
13Wrong answer0/272ms31208 KiB
14Wrong answer0/263ms31924 KiB
15Wrong answer0/279ms40956 KiB
16Wrong answer0/292ms42904 KiB
17Wrong answer0/293ms43916 KiB
18Wrong answer0/282ms44052 KiB
19Wrong answer0/282ms43916 KiB
20Wrong answer0/271ms31464 KiB
21Wrong answer0/287ms41188 KiB
22Accepted2/282ms44188 KiB