245172026-02-12 16:18:50VikiVölgy (100 pont)python3Wrong answer 20/100300ms7160 KiB
N = int(input()) #elemek szama
M = [] #magasagok
for i in range (N):
    M.append(int(input()))
a = 0 #aktualis hossz
h = 0 #eddigi leghosszabb
L = 0 #jelenlegi legmagasabb
Si = 0 
Ei = N
i = 0
while M[i] <= M[i+1]: #felesleges elemek a lista elejetol
    M.pop(i)
M.reverse() 
while M[i] <= M[i+1]: #felesleges elemek a lista hatuljatol
    M.pop(i)
M.reverse() #eredeti sorrendre
i=0
for i in range(len(M)):
    if M[i] >= L: #ha a jelenlegi elem nagyobb az elozo legnagyobbnal
        if a>h:
            h = a
            a = 0
        L = M[i]
    else:
        a += 1

print(h+1)
SubtaskSumTestVerdictTimeMemory
base20/100
1Accepted0/016ms3124 KiB
2Wrong answer0/017ms3124 KiB
3Accepted5/516ms3112 KiB
4Accepted5/516ms3100 KiB
5Wrong answer0/516ms3124 KiB
6Wrong answer0/517ms3124 KiB
7Runtime error0/516ms3120 KiB
8Wrong answer0/517ms3172 KiB
9Runtime error0/517ms3032 KiB
10Wrong answer0/517ms2996 KiB
11Accepted5/523ms3348 KiB
12Wrong answer0/529ms3056 KiB
13Wrong answer0/529ms3448 KiB
14Wrong answer0/530ms3532 KiB
15Wrong answer0/5162ms6936 KiB
16Wrong answer0/5165ms6920 KiB
17Time limit exceeded0/5284ms7092 KiB
18Time limit exceeded0/5300ms7072 KiB
19Time limit exceeded0/5286ms6952 KiB
20Accepted5/5162ms6948 KiB
21Time limit exceeded0/5291ms6932 KiB
22Wrong answer0/5165ms7160 KiB