249942026-02-17 11:31:50Leventusz09Völgy (100 pont)python3Wrong answer 0/100300ms23700 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
base0/100
1Wrong answer0/016ms3124 KiB
2Wrong answer0/076ms6480 KiB
3Wrong answer0/516ms3116 KiB
4Wrong answer0/514ms3136 KiB
5Wrong answer0/516ms3140 KiB
6Wrong answer0/517ms3124 KiB
7Wrong answer0/516ms3064 KiB
8Wrong answer0/517ms3124 KiB
9Wrong answer0/574ms6352 KiB
10Wrong answer0/550ms5468 KiB
11Time limit exceeded0/5298ms20788 KiB
12Wrong answer0/598ms3820 KiB
13Time limit exceeded0/5284ms17716 KiB
14Time limit exceeded0/5298ms22412 KiB
15Time limit exceeded0/5273ms13620 KiB
16Time limit exceeded0/5284ms20608 KiB
17Time limit exceeded0/5286ms21300 KiB
18Time limit exceeded0/5279ms10940 KiB
19Time limit exceeded0/5282ms21556 KiB
20Time limit exceeded0/5284ms22068 KiB
21Time limit exceeded0/5300ms23364 KiB
22Time limit exceeded0/5298ms23700 KiB