163912025-04-29 11:34:14algoproFasor (40)pypy3Runtime error 26/4075ms32000 KiB
# UUID: 27e2bed9-3c3c-48e5-a6ea-2db61e4a9e58
N,K=[int(x) for x in input().split()]
A= input().split()

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

print(res+1)
SubtaskSumTestVerdictTimeMemory
base26/40
1Accepted0/043ms19364 KiB
2Accepted0/043ms21232 KiB
3Accepted2/239ms19464 KiB
4Accepted2/245ms19512 KiB
5Accepted2/248ms19376 KiB
6Accepted2/241ms19320 KiB
7Accepted2/241ms19592 KiB
8Accepted2/246ms19920 KiB
9Accepted2/250ms21176 KiB
10Accepted2/243ms21240 KiB
11Accepted2/248ms21120 KiB
12Accepted2/243ms21228 KiB
13Accepted2/268ms31188 KiB
14Accepted2/268ms31940 KiB
15Runtime error0/272ms32000 KiB
16Runtime error0/268ms32000 KiB
17Runtime error0/261ms32000 KiB
18Runtime error0/261ms32000 KiB
19Runtime error0/270ms32000 KiB
20Accepted2/275ms31372 KiB
21Runtime error0/268ms32000 KiB
22Runtime error0/261ms32000 KiB