163832025-04-29 10:33:39algoproFasor (40)pypy3Runtime error 26/4079ms32000 KiB
# UUID: a13cdf79-99e3-4378-a20f-abffc9da0a86
N,K=[int(x) for x in input().split()]
A=[int(x) for x in input().split()]

res=0
done = False
while not done:
    for i in range(K+1):
        if res+i<N:
            if A[res]<A[res+i]:
                res+=i
                i=-1
                break
        else:
            done=True
            break
    if i==K:
        done=True

print(res+1)
SubtaskSumTestVerdictTimeMemory
base26/40
1Accepted0/043ms19428 KiB
2Accepted0/054ms21456 KiB
3Accepted2/246ms19396 KiB
4Accepted2/239ms19468 KiB
5Accepted2/241ms19528 KiB
6Accepted2/245ms19432 KiB
7Accepted2/243ms19652 KiB
8Accepted2/248ms21428 KiB
9Accepted2/254ms21472 KiB
10Accepted2/246ms21512 KiB
11Accepted2/256ms21324 KiB
12Accepted2/252ms21512 KiB
13Accepted2/268ms31112 KiB
14Accepted2/279ms31980 KiB
15Runtime error0/268ms32000 KiB
16Runtime error0/263ms32000 KiB
17Runtime error0/271ms32000 KiB
18Runtime error0/271ms32000 KiB
19Runtime error0/263ms32000 KiB
20Accepted2/274ms31520 KiB
21Runtime error0/261ms32000 KiB
22Runtime error0/268ms32000 KiB