255212026-02-20 13:36:08Leventusz09Völgy (100 pont)python3Runtime error 0/100159ms7172 KiB
N=int(input())
b=0
bi = 0
c=0
d=0
e=[]
f=[]
k=[]
for i in range(N):
    a=int(input())
    e.append(a)
    if(b<=a):
        b=a
        bi=i
b=0
for i in range(len(e)):
    if(f[i]<b):
        c=c+1
    else:
        b=f[i]
        if(c>d):
            d=c
            c=0
        else:
            c=0
    if (i==bi):
        break
b=0
for i in reversed(range(len(e))):
    if(k[i]<b):
        c=c+1
    else:
        b=k[i]
        if(c>d):
            d=c
            c=0
        else:
            c=0
    if (i==bi):
        break
if(d==0):
   print("-1")
else:
    print(d+1)
SubtaskSumTestVerdictTimeMemory
base0/100
1Runtime error0/016ms3320 KiB
2Runtime error0/017ms3116 KiB
3Runtime error0/516ms3120 KiB
4Runtime error0/516ms3124 KiB
5Runtime error0/516ms3124 KiB
6Runtime error0/516ms2952 KiB
7Runtime error0/516ms3108 KiB
8Runtime error0/516ms2960 KiB
9Runtime error0/517ms3124 KiB
10Runtime error0/517ms3120 KiB
11Runtime error0/524ms3376 KiB
12Runtime error0/529ms3320 KiB
13Runtime error0/530ms3380 KiB
14Runtime error0/530ms3376 KiB
15Runtime error0/5151ms7080 KiB
16Runtime error0/5157ms7172 KiB
17Runtime error0/5152ms7080 KiB
18Runtime error0/5159ms7076 KiB
19Runtime error0/5152ms7076 KiB
20Runtime error0/5159ms7024 KiB
21Runtime error0/5157ms7080 KiB
22Runtime error0/5158ms7080 KiB