249882026-02-17 11:24:10Leventusz09Völgy (100 pont)python3Wrong answer 15/100182ms7040 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()
c=0
for i in reversed(e):
            if(i<a):
                c=c+1
            else:
                a=i
                c=0
if(c==d):
     f=d
if(f==0):
    print("-1")
else:
    print(f+1)
SubtaskSumTestVerdictTimeMemory
base15/100
1Wrong answer0/016ms3312 KiB
2Wrong answer0/017ms3124 KiB
3Wrong answer0/516ms3124 KiB
4Wrong answer0/516ms3124 KiB
5Wrong answer0/516ms3056 KiB
6Wrong answer0/516ms3080 KiB
7Accepted5/516ms2952 KiB
8Wrong answer0/516ms3120 KiB
9Accepted5/517ms3124 KiB
10Wrong answer0/517ms3320 KiB
11Wrong answer0/524ms3124 KiB
12Wrong answer0/530ms3124 KiB
13Wrong answer0/529ms3124 KiB
14Wrong answer0/532ms3364 KiB
15Wrong answer0/5155ms3208 KiB
16Wrong answer0/5165ms4540 KiB
17Accepted5/5182ms7040 KiB
18Wrong answer0/5158ms3916 KiB
19Wrong answer0/5162ms4116 KiB
20Wrong answer0/5168ms5396 KiB
21Wrong answer0/5159ms6044 KiB
22Wrong answer0/5158ms5780 KiB