165002025-05-03 18:51:54algoproFasor (40)pypy3Accepted 40/4097ms44048 KiB
# UUID: 6ddb6b8e-48d5-4b86-9875-c405d7068201
#apa

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
            break

print(i+1)
SubtaskSumTestVerdictTimeMemory
base40/40
1Accepted0/045ms19400 KiB
2Accepted0/048ms21468 KiB
3Accepted2/245ms19424 KiB
4Accepted2/239ms19352 KiB
5Accepted2/246ms19432 KiB
6Accepted2/243ms19452 KiB
7Accepted2/241ms19740 KiB
8Accepted2/246ms21540 KiB
9Accepted2/254ms21540 KiB
10Accepted2/252ms21316 KiB
11Accepted2/248ms21444 KiB
12Accepted2/246ms21548 KiB
13Accepted2/267ms31216 KiB
14Accepted2/276ms31972 KiB
15Accepted2/293ms40960 KiB
16Accepted2/283ms43008 KiB
17Accepted2/285ms43912 KiB
18Accepted2/297ms44048 KiB
19Accepted2/297ms43904 KiB
20Accepted2/265ms31540 KiB
21Accepted2/293ms41120 KiB
22Accepted2/282ms43988 KiB