26652023-01-18 14:47:39TheLol02Fasor (40)python3Time limit exceeded 20/40279ms50260 KiB
from sys import stdin, stdout
def main():
    adat = list(map(int, stdin.readline().split()))
    m = list(map(int, stdin.readline().split()))
    j = []
    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/017ms11080 KiB
2Accepted0/025ms13480 KiB
3Accepted2/217ms11872 KiB
4Accepted2/217ms11748 KiB
5Accepted2/217ms11928 KiB
6Accepted2/217ms12476 KiB
7Accepted2/217ms12536 KiB
8Accepted2/228ms12904 KiB
9Accepted2/218ms14492 KiB
10Accepted2/224ms14548 KiB
11Accepted2/237ms14972 KiB
12Accepted2/219ms14260 KiB
13Time limit exceeded0/2261ms16440 KiB
14Runtime error0/279ms34332 KiB
15Runtime error0/257ms49148 KiB
16Runtime error0/257ms48964 KiB
17Runtime error0/259ms50252 KiB
18Runtime error0/259ms50260 KiB
19Runtime error0/254ms49264 KiB
20Time limit exceeded0/2279ms14188 KiB
21Runtime error0/257ms49428 KiB
22Runtime error0/254ms49652 KiB