38832023-03-03 13:43:53PallanekPéterVölgy (100 pont)python3Wrong answer 95/100157ms13696 KiB
n=int(input())
a=int(input())
db=1; Mdb=0; v=0; vhely=0; ahely=0
for i in range(n-1):
    be=int(input())
    if be < a:
        db+=1
        if v<be:
            v=be; vhely=i
    else:
        if db>Mdb:
            Mdb=db
        ahely=i; a=be; db=1; v=0
if Mdb<vhely-ahely:
    Mdb=vhely-ahely
if Mdb<2:
    print(-1)
else:
    print(Mdb)
SubtaskSumTestVerdictTimeMemory
base95/100
1Accepted0/017ms11164 KiB
2Accepted0/018ms11472 KiB
3Accepted5/517ms11480 KiB
4Accepted5/517ms11724 KiB
5Accepted5/517ms11620 KiB
6Accepted5/517ms11860 KiB
7Accepted5/517ms11936 KiB
8Accepted5/517ms12136 KiB
9Accepted5/517ms12204 KiB
10Accepted5/518ms12156 KiB
11Accepted5/524ms12540 KiB
12Accepted5/530ms12588 KiB
13Accepted5/529ms12756 KiB
14Wrong answer0/529ms12448 KiB
15Accepted5/5142ms12996 KiB
16Accepted5/5146ms13108 KiB
17Accepted5/5151ms13036 KiB
18Accepted5/5157ms13284 KiB
19Accepted5/5145ms13232 KiB
20Accepted5/5145ms13444 KiB
21Accepted5/5146ms13680 KiB
22Accepted5/5149ms13696 KiB