249922026-02-17 11:31:13Leventusz09Völgy (100 pont)python3Wrong answer 0/100298ms23612 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/016ms3320 KiB
2Wrong answer0/075ms6464 KiB
3Wrong answer0/516ms3320 KiB
4Wrong answer0/516ms3124 KiB
5Wrong answer0/516ms3124 KiB
6Wrong answer0/517ms3124 KiB
7Wrong answer0/517ms3124 KiB
8Wrong answer0/516ms3092 KiB
9Wrong answer0/575ms6192 KiB
10Wrong answer0/550ms5416 KiB
11Time limit exceeded0/5298ms20944 KiB
12Wrong answer0/597ms3736 KiB
13Time limit exceeded0/5275ms17312 KiB
14Time limit exceeded0/5298ms22176 KiB
15Time limit exceeded0/5282ms14140 KiB
16Time limit exceeded0/5282ms20532 KiB
17Time limit exceeded0/5284ms21068 KiB
18Time limit exceeded0/5287ms11316 KiB
19Time limit exceeded0/5277ms20848 KiB
20Time limit exceeded0/5287ms22580 KiB
21Time limit exceeded0/5279ms21812 KiB
22Time limit exceeded0/5298ms23612 KiB