26662023-01-18 14:50:00TheLol02Fasor (40)python3Time limit exceeded 20/40300ms49728 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 = 0
        for j in range(1,adat[1]+1):
            if i+j <= (adat[0]-adat[1]):
                if m[i] < m[i+j]:
                    r += 1
            if i+j >= 0:
                if (m[i] < m[i-j]):
                    r += 1
        if r == 0:
            stdout.write(str(i+1))
            exit()
main()
SubtaskSumTestVerdictTimeMemory
base20/40
1Accepted0/017ms11408 KiB
2Accepted0/025ms13540 KiB
3Accepted2/217ms11820 KiB
4Accepted2/217ms12404 KiB
5Accepted2/217ms11972 KiB
6Accepted2/217ms11980 KiB
7Accepted2/217ms12320 KiB
8Accepted2/228ms12836 KiB
9Accepted2/219ms14624 KiB
10Accepted2/224ms14576 KiB
11Accepted2/235ms14644 KiB
12Accepted2/219ms14352 KiB
13Time limit exceeded0/2300ms16220 KiB
14Runtime error0/279ms34544 KiB
15Runtime error0/257ms48640 KiB
16Runtime error0/257ms48548 KiB
17Runtime error0/259ms49444 KiB
18Runtime error0/259ms49728 KiB
19Runtime error0/259ms48588 KiB
20Time limit exceeded0/2287ms13524 KiB
21Runtime error0/257ms48904 KiB
22Runtime error0/259ms48864 KiB