131592025-01-06 19:15:59fzs1969InverziĂłpython3Wrong answer 3/50470ms64664 KiB
db = int(input())
t = list(map(int,input().split()))
méret = db + 1
h = [0] * méret
for i in range(db):
     h[t[i]] = i

maximum = h[0]
maxtáv = 0
for i in range(1,méret):
    if maxtáv < maximum-h[i]:
        maxtáv = maximum-h[i]
        elemek = [h[i], maximum]
        if maximum < h[i]:
            maximum = h[i]

if maxtáv > 0:
    print(elemek[0]+1, elemek[1]+1)
else:
    print(-1)
SubtaskSumTestVerdictTimeMemory
base3/50
1Wrong answer0/016ms3120 KiB
2Wrong answer0/045ms8796 KiB
3Accepted1/116ms3308 KiB
4Wrong answer0/217ms3124 KiB
5Wrong answer0/717ms3124 KiB
6Wrong answer0/250ms8744 KiB
7Wrong answer0/2349ms64588 KiB
8Wrong answer0/2465ms64508 KiB
9Wrong answer0/2405ms64448 KiB
10Wrong answer0/2458ms64576 KiB
11Wrong answer0/2411ms64576 KiB
12Wrong answer0/2462ms60548 KiB
13Wrong answer0/2388ms64576 KiB
14Wrong answer0/2460ms64572 KiB
15Wrong answer0/2333ms64576 KiB
16Wrong answer0/2402ms64572 KiB
17Wrong answer0/2462ms64664 KiB
18Wrong answer0/2470ms64572 KiB
19Wrong answer0/3331ms64572 KiB
20Wrong answer0/3324ms64572 KiB
21Wrong answer0/2349ms64588 KiB
22Wrong answer0/2451ms64576 KiB
23Wrong answer0/2414ms64580 KiB
24Accepted2/2342ms64572 KiB