Problem p02923 (python)

Fixed submission:
import sys
sys.setrecursionlimit(1000000)

n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        cnt1 = 0
    else:
        cnt1 += 1

li3.append(cnt1)

print(max(li3))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(1000000)

n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)

print(max(li3))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(1000000)

n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)

print(max(li3))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(100000000000)

n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)

print(max(li3))

Buggy submission (verdict: Runtime Error):
import sys
sys.setrecursionlimit(200000)

n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)

print(max(li3))

Buggy submission (verdict: Runtime Error):
n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)

print(max(li3))

Buggy submission (verdict: Runtime Error):
n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)

print(max(li3))

Buggy submission (verdict: Runtime Error):
n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
cnt1 = 0
cnt2 = 0
li3 = []
li4 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        li4.append(cnt2)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)
        li4.append(cnt2)

print(max(li3))

Buggy submission (verdict: Runtime Error):
n = int(input())
li1 = list(map(int, input().split()))

li2 = []
for i in range(1, len(li1)):
    li2.append(li1[i-1] - li1[i])
    
print(li2)

cnt1 = 0
cnt2 = 0
li3 = []
li4 = []

for i in li2:
    cnt2 += 1
    if i < 0:
        li3.append(cnt1)
        li4.append(cnt2)
        cnt1 = 0
    else:
        cnt1 += 1
    if cnt2 == len(li2):
        li3.append(cnt1)
        li4.append(cnt2)

print(max(li3))