26692023-01-18 15:09:24TheLol02Fasor (40)python3Runtime error 18/40246ms50456 KiB
from sys import stdin, stdout
def main():
    adat = list(map(int, stdin.readline().split()))
    m = list(map(int, stdin.readline().split()))
    for i in range(adat[0]):
        r = False
        for j in range(1,adat[1]+1):
            if i <= (adat[0]-adat[1]):
                if m[i] < m[i+j]:
                    r = True
            if i+j >= 0:
                if (m[i] < m[i-j]):
                    r = True
        if r == False:
            stdout.write(str(i+1))
            exit()
main()
SubtaskSumTestVerdictTimeMemory
base18/40
1Accepted0/017ms11228 KiB
2Accepted0/025ms13944 KiB
3Accepted2/216ms11628 KiB
4Runtime error0/217ms11844 KiB
5Accepted2/217ms12112 KiB
6Accepted2/217ms12000 KiB
7Accepted2/217ms12240 KiB
8Accepted2/227ms12876 KiB
9Accepted2/219ms14896 KiB
10Accepted2/224ms14876 KiB
11Accepted2/235ms15176 KiB
12Accepted2/219ms14628 KiB
13Time limit exceeded0/2246ms16692 KiB
14Runtime error0/275ms34840 KiB
15Runtime error0/256ms49328 KiB
16Runtime error0/257ms49412 KiB
17Runtime error0/254ms50264 KiB
18Runtime error0/259ms50456 KiB
19Runtime error0/254ms49500 KiB
20Time limit exceeded0/2246ms14384 KiB
21Runtime error0/257ms50072 KiB
22Runtime error0/254ms49624 KiB