26702023-01-18 15:10:34TheLol02Fasor (40)python3Time limit exceeded 20/40266ms51016 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+j <= (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
base20/40
1Accepted0/017ms11264 KiB
2Accepted0/024ms13728 KiB
3Accepted2/217ms11768 KiB
4Accepted2/217ms12004 KiB
5Accepted2/217ms11880 KiB
6Accepted2/217ms12276 KiB
7Accepted2/217ms12468 KiB
8Accepted2/228ms12992 KiB
9Accepted2/219ms14900 KiB
10Accepted2/224ms15024 KiB
11Accepted2/235ms14956 KiB
12Accepted2/219ms14544 KiB
13Time limit exceeded0/2266ms16788 KiB
14Wrong answer0/287ms35316 KiB
15Runtime error0/250ms49500 KiB
16Runtime error0/252ms49372 KiB
17Runtime error0/259ms50688 KiB
18Runtime error0/259ms51016 KiB
19Runtime error0/259ms49852 KiB
20Wrong answer0/254ms30092 KiB
21Runtime error0/257ms49980 KiB
22Runtime error0/259ms49852 KiB