249952026-02-17 11:32:46Leventusz09Völgy (100 pont)python3Wrong answer 15/100180ms6932 KiB
N=int(input())
b=0
c=0
d=0
e=[]
f=0
g=-1
for i in range(N):
    a=int(input())
    #print("a b c d e f g")
    #print(a, b, c, d, e, f, g)
    if(a<b):
        c=c+1
        e.append(a)
        #print(e)
    else:
        b=a
        if(c>d):
            d=c
            c=0
            for i in reversed(e):
                if(i<a):
                    g=g+1
                else:
                    a=i
                    g=0
        else:
            c=0
            e.clear()
if(g==d):
     f=d
if(f==0):
    print("-1")
else:
    print(f+1)
SubtaskSumTestVerdictTimeMemory
base15/100
1Accepted0/016ms3120 KiB
2Wrong answer0/017ms3124 KiB
3Wrong answer0/516ms3316 KiB
4Wrong answer0/516ms3124 KiB
5Wrong answer0/516ms3100 KiB
6Wrong answer0/516ms2972 KiB
7Accepted5/516ms3000 KiB
8Wrong answer0/516ms3112 KiB
9Accepted5/517ms3088 KiB
10Wrong answer0/517ms3148 KiB
11Wrong answer0/524ms3300 KiB
12Wrong answer0/529ms3120 KiB
13Wrong answer0/532ms3128 KiB
14Wrong answer0/532ms3264 KiB
15Wrong answer0/5158ms3180 KiB
16Wrong answer0/5167ms5032 KiB
17Accepted5/5165ms6932 KiB
18Wrong answer0/5164ms4632 KiB
19Wrong answer0/5165ms5140 KiB
20Wrong answer0/5172ms6424 KiB
21Wrong answer0/5180ms6696 KiB
22Wrong answer0/5171ms5676 KiB