245062026-02-12 09:55:36Leventusz09Völgy (100 pont)python3Wrong answer 15/100179ms7684 KiB
N=int(input())
b=0
c=0
d=0
e=[]
f=0
for i in range(N):
    a=int(input())
    #print("a b c d")
    #print(a, b, c, d)
    if(a<b):
        c=c+1
        e.append(a)
        #print(e)
    else:
        b=a
        if(c<d):
            d=c
            c=0
        else:
            c=0
            e.clear()
for i in reversed(e):
            if(i>a):
                f=0
            else:
                f=f+1
if(f==0):
    print("-1")
else:
    print(f+1)
SubtaskSumTestVerdictTimeMemory
base15/100
1Accepted0/016ms3152 KiB
2Wrong answer0/017ms3116 KiB
3Wrong answer0/517ms2868 KiB
4Wrong answer0/514ms3096 KiB
5Wrong answer0/516ms2948 KiB
6Wrong answer0/514ms3012 KiB
7Accepted5/514ms2892 KiB
8Wrong answer0/517ms3124 KiB
9Accepted5/517ms2976 KiB
10Wrong answer0/517ms3024 KiB
11Wrong answer0/523ms3064 KiB
12Wrong answer0/529ms3064 KiB
13Wrong answer0/532ms3156 KiB
14Wrong answer0/532ms3260 KiB
15Wrong answer0/5160ms3160 KiB
16Wrong answer0/5159ms4384 KiB
17Accepted5/5179ms7684 KiB
18Wrong answer0/5158ms3916 KiB
19Wrong answer0/5163ms4160 KiB
20Wrong answer0/5163ms5524 KiB
21Wrong answer0/5164ms5836 KiB
22Wrong answer0/5160ms5632 KiB