Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        now = 0
        for j in range(i + 1, n):
            if h[j] <= h[j - 1]:
                now += 1
            else:
                i = j - 1
                break
        if now >= max:
            max = now
        i += 1
    print(max)

if __name__ == "__main__":
    main()



Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    while i < n - 1:
        now = 0
        for j in range(i + 1, n):
            if h[j] <= h[j - 1]:
                now += 1
            else:
                i = j - 1
                break
        if now >= max:
            max = now
        i += 1
    print(max)

if __name__ == "__main__":
    main()



Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    while i < n - 1:
        now = 0
        for j in range(i + 1, n):
            if h[j] <= h[j - 1]:
                now += 1
            else:
                i = j - 1
                break
        if now >= max:
            max = now
        i += 1
    print(max)

if __name__ == "__main__":
    main()



Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    h = list(map(int, input().split()))
    max = 0
    now = 0
    i = 0
    while i < n - 1:
        now = 0
        for j in range(i + 1, n):
            if h[j] <= h[j - 1]:
                now += 1
            else:
                i = j - 1
                break
        if now >= max:
            max = now
        i += 1
    print(max)

if __name__ == "__main__":
    main()



Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
def main():
    n = int(input())
    h = list(map(int, input().split()))
    max = 0
    now = 0
    i = 0
    while i < n - 1:
        now = 0
        for j in range(i + 1, n):
            if h[j] <= h[j - 1]:
                now += 1
                if j == n - 1:
                    if now >= max:
                        max = now
                    break
            else:
                if now >= max:
                    max = now
                i = j - 1
                break
        i += 1
    print(max)

if __name__ == "__main__":
    main()



Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h=list(map(int,input().split()))
max=0
now=0
i=0
while i<n-1:
    now=0
    for j in range(i+1,n):
        if h[j]<=h[j-1]:
            now+=1
            if j==n-1:
                if now>=max:
                    max=now
                break
        else:
            if now>=max:
                max=now
            i=j-1
            break
    i+=1
print(max)

Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h=list(map(int,input().split()))
max=0
now=0
i=0
while i<n-1:
    now=0
    for j in range(i+1,n):
        if h[j]<=h[j-1]:
            now+=1
            if j==n-1:
                if now>=max:
                    max=now
                break
        else:
            if now>=max:
                max=now
            i=j-1
            break
    i+=1
print(max)

Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h=list(map(int,input().split()))
max=0
now=0
for i in range(n-1):
    now=0
    for j in range(i+1,n):
        if h[j]<=h[j-1]:
            now+=1
            if j==n-1:
                if now>=max:
                    max=now
                break
        else:
            if now>=max:
                max=now
            break
print(max)

Fixed submission:
def main():
    n = int(input())
    h = input().split()
    h = [int(n) for n in h]
    max = 0
    now = 0
    i = 0
    for i in range(n-1):
        if h[i] >= h[i+1]:
            now += 1
        else:
            if now >= max:
                max = now
            now=0
        if now >= max:
            max = now
    print(max)

if __name__ == "__main__":
    main()