7252021-12-21 13:48:39kismartongInverziópython3Wrong answer 2/50218ms121504 KiB
from sys import stdin, stdout

def main():
    n = int(stdin.readline())
    szamok = list(map(int, stdin.readline().split()))
    maxi, kezd, veg = 0, 0, n-1
    while True:
        if szamok[kezd] > szamok[veg] and veg-kezd > maxi:
            maxi = veg-kezd
            break
        elif veg > kezd:
            veg -= 1
        else:
            kezd += 1
    stdout.writelines(str(kezd+1) + " " + str(veg+1))

main()
            
    
SubtaskSumTestVerdictTimeMemory
base2/50
1Accepted0/048ms19356 KiB
2Wrong answer0/067ms31072 KiB
3Runtime error0/128ms19632 KiB
4Accepted2/228ms19800 KiB
5Wrong answer0/728ms19748 KiB
6Wrong answer0/248ms31436 KiB
7Runtime error0/2218ms113288 KiB
8Runtime error0/2170ms117748 KiB
9Runtime error0/2150ms120856 KiB
10Runtime error0/2145ms121404 KiB
11Runtime error0/2171ms121504 KiB
12Runtime error0/2138ms119684 KiB
13Runtime error0/2142ms121456 KiB
14Runtime error0/2158ms121400 KiB
15Runtime error0/2143ms121448 KiB
16Runtime error0/2152ms121452 KiB
17Runtime error0/2155ms121408 KiB
18Runtime error0/2148ms121444 KiB
19Runtime error0/3143ms121400 KiB
20Runtime error0/3141ms121460 KiB
21Runtime error0/2143ms121452 KiB
22Runtime error0/2142ms121452 KiB
23Runtime error0/2163ms121496 KiB
24Runtime error0/2146ms121476 KiB