Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import numpy as np
%time N, M =map(int, input().split())
%time A = np.array(list(map(int, input().split())))
#print(A)
log_A = np.log2(A)

for i in range(M):
    maximum =  log_A.argmax()
    log_A[maximum] = log_A[maximum]-1
    #print(A)
A = np.power(2, log_A)
%time A = np.trunc(A)
print(int(A.sum()))


Fixed submission:
import heapq

n, m = map(int, input().split())
a = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(a)  # aを優先度付きキューに

for _ in range(m):
    tmp_min = heapq.heappop(a)
    heapq.heappush(a, (-1)*(-tmp_min//2))  # 計算誤差の関係で-1を2回かけてます
print(-sum(a))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N, M =map(int, input().split())
A = np.array(list(map(int, input().split())))
#print(A)
for i in range(M):
    maximum =  A.argmax()
    A[maximum] = A[maximum]/2
    #print(A)

A = np.trunc(A)
print(int(A.sum()))


Fixed submission:
import heapq

n, m = map(int, input().split())
a = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(a)  # aを優先度付きキューに

for _ in range(m):
    tmp_min = heapq.heappop(a)
    heapq.heappush(a, (-1)*(-tmp_min//2))  # 計算誤差の関係で-1を2回かけてます
print(-sum(a))

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N, M =map(int, input().split())
A = np.array(list(map(int, input().split())))
#print(A)
for i in range(M):
    A = np.sort(A)[::-1]
    A[0] = A[0]/2
    #print(A)

A = np.trunc(A)
print(int(A.sum()))


Fixed submission:
import heapq

n, m = map(int, input().split())
a = list(map(lambda x: int(x)*(-1), input().split()))
heapq.heapify(a)  # aを優先度付きキューに

for _ in range(m):
    tmp_min = heapq.heappop(a)
    heapq.heappush(a, (-1)*(-tmp_min//2))  # 計算誤差の関係で-1を2回かけてます
print(-sum(a))
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N%2==0:
  N_=int(N/2)
  print(N_*(N-1))
else N%2!=0:
  N_=int((N-1)/2)
  print(N_*N)

Fixed submission:
N = int(input())
if N%2==0:
  N_=int(N/2)
  print(N_*(N-1))
else:
  N_=int((N-1)/2)
  print(N_*N)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a = range(1,N)
print(sum(a))

Fixed submission:
N = int(input())
if N%2==0:
  N_=int(N/2)
  print(N_*(N-1))
else:
  N_=int((N-1)/2)
  print(N_*N)
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int,input().split())
if 0 in A:
  print(sum(A))
else:
  count=0
  min_A =100000000000000000
  for i in range(N):
    if A[i]<0:
      count=count+1
    if abs(A[i])<min_A:
      min_A = abs(A[i])
  print(sum(A)-min_A)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
  A = list(map(abs,A))
  print(sum(A))
else:
  count=0
  min_A =100000000000000000
  for i in range(N):
    if A[i]<0:
      count=count+1
    if abs(A[i])<min_A:
      min_A = abs(A[i])
  A = list(map(abs,A))
  if count%2==0:
    print(sum(A))
  else:
    print(sum(A)-min_A*2)

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = map(int,input())
if 0 in A:
  print(sum(A))
else:
  count=0
  min_A =100000000000000000
  for i in range(N):
    if A[i]<0:
      count=count+1
    if abs(A[i])<min_A:
      min_A = abs(A[i])
  print(sum(A)-min_A)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
if 0 in A:
  A = list(map(abs,A))
  print(sum(A))
else:
  count=0
  min_A =100000000000000000
  for i in range(N):
    if A[i]<0:
      count=count+1
    if abs(A[i])<min_A:
      min_A = abs(A[i])
  A = list(map(abs,A))
  if count%2==0:
    print(sum(A))
  else:
    print(sum(A)-min_A*2)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())


def solve(n):
    ans = 0
    for x in range(1, 100 + 1):
        rest = n - x ** 2
        if rest < x + x + 2:
            break
        for y in range(1, 100 + 1):
            rest2 = rest - y ** 2 - x * y
            if rest2 < y + 1:
                break
            for z in range(1, 100 + 1):
                rest3 = rest2 - z ** 2 - y * z - z * x
                if rest3 < 0:
                    break
                if rest3 == 0:
                    ans += 1
    return ans


for i in range(1, n + 1):
    print(solve(i))


Fixed submission:
n = int(input())
ans = [0 for _ in range(n + 1)]

for x in range(1, 100 + 1):
    if x ** 2 > n - 2 * x - 2:
        break
    for y in range(1, 100 + 1):
        if x**2 + y ** 2 > n - x - y - x * y:
            break
        for z in range(1, 100 + 1):
            f = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
            if f > n:
                break
            ans[f] += 1


for i in range(1, n + 1):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split())
ls = list(map(int, input().split()))

d = 0
count = 0
while d <= x:
    d += ls[count]
    count += 1

print(count)


Fixed submission:
n, x = map(int, input().split())
ls = list(map(int, input().split()))

d = 0
count = 1
for a in ls:
    d += a
    if d <= x:
        count += 1

print(count)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
aa = list(map(int, input().split()))

import fractions
math = fractions
table = {}  ## (start, end) => gcd

for i in range(0, n):
    if i > 0:
        gcd = aa[0]
        for j in range(0, i):
            gcd = math.gcd(gcd, aa[j])
        table[(0, i)] = gcd

    if i < n - 1:
        gcd = aa[i + 1]
        for j in range(i + 1, n):
            gcd = fractions.gcd(gcd, aa[j])

        table[(i + 1, n)] = gcd

candidate = 1
for i in range(0, n):
    if i == 0:
        gcd2 = table[(i + 1, n)]
        candidate = max(gcd2, candidate)
    elif i == n - 1:
        gcd1 = table[(0, i)]
        candidate = max(gcd1, candidate)
    else:
        gcd1 = table[(0, i)]
        gcd2 = table[(i + 1, n)]
        candidate = max(math.gcd(gcd1, gcd2), candidate)

print(candidate)


Fixed submission:
n = int(input())
aa = list(map(int, input().split()))

import fractions

head = {}
head[0] = aa[0]
for i in range(1, n):
    head[i] = fractions.gcd(head[i - 1], aa[i])

tail = {}
tail[n - 1] = aa[-1]
for i in range(n - 2, -1, -1):
    tail[i] = fractions.gcd(tail[i + 1], aa[i])

candidate = 1
for i in range(0, n):
    if i == 0:
        gcd2 = tail[i + 1]
        candidate = max(gcd2, candidate)
    elif i == n - 1:
        gcd1 = head[i - 1]
        candidate = max(gcd1, candidate)
    else:
        gcd1 = head[i - 1]
        gcd2 = tail[i + 1]
        candidate = max(fractions.gcd(gcd1, gcd2), candidate)

print(candidate)

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

import math

table = {}  ## (start, end) => gcd

for i in range(0, n):
    if i > 0:
        gcd = aa[0]
        for j in range(0, i):
            gcd = math.gcd(gcd, aa[j])
        table[(0, i)] = gcd

    if i < n - 1:
        gcd = aa[i + 1]
        for j in range(i + 1, n):
            gcd = math.gcd(gcd, aa[j])

        table[(i + 1, n)] = gcd

candidate = 1
for i in range(0, n):
    if i == 0:
        gcd2 = table[(i + 1, n)]
        candidate = max(gcd2, candidate)
    elif i == n - 1:
        gcd1 = table[(0, i)]
        candidate = max(gcd1, candidate)
    else:
        gcd1 = table[(0, i)]
        gcd2 = table[(i + 1, n)]
        candidate = max(math.gcd(gcd1, gcd2), candidate)

print(candidate)


Fixed submission:
n = int(input())
aa = list(map(int, input().split()))

import fractions

head = {}
head[0] = aa[0]
for i in range(1, n):
    head[i] = fractions.gcd(head[i - 1], aa[i])

tail = {}
tail[n - 1] = aa[-1]
for i in range(n - 2, -1, -1):
    tail[i] = fractions.gcd(tail[i + 1], aa[i])

candidate = 1
for i in range(0, n):
    if i == 0:
        gcd2 = tail[i + 1]
        candidate = max(gcd2, candidate)
    elif i == n - 1:
        gcd1 = head[i - 1]
        candidate = max(gcd1, candidate)
    else:
        gcd1 = head[i - 1]
        gcd2 = tail[i + 1]
        candidate = max(fractions.gcd(gcd1, gcd2), candidate)

print(candidate)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()

def trim(n, s):
    i = 0
    while i < n and s[i] == '.':
        i += 1
    start = i

    i = n
    while i > 0 and s[i - 1] == '#':
        i -= 1
    end = i

    return s[start:end]


def f(n, s):
    bs = 0
    ws = 0

    for c in s:
        if c == '#':
            bs += 1
        else:
            ws += 1
    return min(ws, bs)


def g(n, s):
    bs = 0
    ws = 0
    i = 0
    while i < n:
        if s[i] == '#':
            bs += 1
        else:
            break
        i += 1

    i = len(s)
    while i > 0:
        if s[i - 1] == '.':
            ws += 1
        else:
            break
        i -= 1

    return bs + ws

s = trim(n, s)
print(min(f(n, s), g(n, s)))


Fixed submission:
n = int(input())
s = input()

a = [(0, 0) for _ in range(len(s) + 1)]

i = 0
while i < len(s):
    bs, ws = a[i + 1]
    b0, w0 = a[i]

    if s[i] == '#':
        bs += 1
    else:
        ws += 1

    a[i + 1] = (bs + b0, ws + w0)
    i += 1


i = 0
can = len(s)
while i < len(a):
    can = min(can, a[i][0] + a[-1][1] - a[i][1])
    i += 1

print(can)
Buggy python submission (verdict: Runtime Error):
n, x = map(int, input().split())

table_l = [-1 for _ in range(50)]
table_p = [-1 for _ in range(50)]
table_l[0] = 1
table_p[0] = 1

for i in range(1, 50):
    table_l[i] = table_l[i-1] * 2 + 3
    table_p[i] = table_p[i-1] * 2 + 1


def f(level, x):
    if level == 1:
        if x == 0 or x == 1:
            return 0
        if x == 2:
            return 1
        if x == 3:
            return 2
        else:
            return 3

    if table_l[level] == x:
        return table_p[level]

    if x - 1 <= table_l[level - 1]:
        return f(level - 1, x - 1)

    if x - 2 == table_l[level - 1]:
        return table_p[level - 1] + 1
    if x - 2 > table_l[level - 1]:
        xx = x - 2 - table_l[level - 1]
        return table_p[level - 1] + 1 + f(level - 1, xx)


print(f(n, x))


Fixed submission:
n, x = map(int, input().split())

table_l = [-1 for _ in range(51)]
table_p = [-1 for _ in range(51)]
table_l[0] = 1
table_p[0] = 1

for i in range(1, 51):
    table_l[i] = table_l[i-1] * 2 + 3
    table_p[i] = table_p[i-1] * 2 + 1


def f(level, x):
    if level == 1:
        if x == 0 or x == 1:
            return 0
        if x == 2:
            return 1
        if x == 3:
            return 2
        else:
            return 3

    if table_l[level] == x:
        return table_p[level]

    if x - 1 <= table_l[level - 1]:
        return f(level - 1, x - 1)

    if x - 2 == table_l[level - 1]:
        return table_p[level - 1] + 1
    if x - 2 > table_l[level - 1]:
        xx = x - 2 - table_l[level - 1]
        return table_p[level - 1] + 1 + f(level - 1, xx)


print(f(n, x))
Buggy python submission (verdict: Runtime Error):
s_to_t = {}
t_to_s = {}

for i in range(len(s)):
    if s[i] not in s_to_t:
        if t[i] not in t_to_s:
            s_to_t[s[i]] = t[i]
            t_to_s[t[i]] = s[i]
            continue
        else:
            print('No')
            exit(0)
    elif s_to_t[s[i]] == t[i] and t_to_s[t[i]] == s[i]:
        continue
    else:
        print('No')
        exit(0)
        
print('Yes')            


Fixed submission:
s = input()
t = input()


s_to_t = {}
t_to_s = {}

for i in range(len(s)):
    if s[i] not in s_to_t:
        if t[i] not in t_to_s:
            s_to_t[s[i]] = t[i]
            t_to_s[t[i]] = s[i]
            continue
        else:
            print('No')
            exit(0)
    elif s_to_t[s[i]] == t[i] and t_to_s[t[i]] == s[i]:
        continue
    else:
        print('No')
        exit(0)
        
print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
import bisect

n = int(input())
aa = list(sorted(map(int, input().split())))
bb = list(sorted(map(int, input().split())))
cc = list(sorted(map(int, input().split())))

ans = 0
for a in aa:
    bi = bisect.bisect(bb, a)
    bx = len(bb) - bi
    for b in range(bi, len(bb)):
        ci = bisect.bisect(cc, bb[b])
        cx = len(cc) - ci
        ans += cx

print(ans)


Fixed submission:
import bisect

n = int(input())
aa = list(sorted(map(int, input().split())))
bb = list(sorted(map(int, input().split())))
cc = list(sorted(map(int, input().split())))

ans = 0
for b in bb:
    ax = bisect.bisect_left(aa, b)
    ci = bisect.bisect(cc, b)
    cx = len(cc) - ci
    ans += ax * cx
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_A = input().split()
q = int(input())
SUM = sum(map(int, list_A))
for i in range(q):
  b, c = input().split()
  dif = 0
  cnt = 0
  if b in list_A:
    flag = True
    while flag:
      try:
        Index = list_A.index(b)
        list_A[Index] = c
        cnt += 1
      except ValueError:
        flag = False
  else:
    pass
  dif = cnt*(int(c) - int(b))
  SUM += dif
  print(SUM)

Fixed submission:
import sys
from collections import Counter
n = int(sys.stdin.readline().rstrip())
A = list(map(int, sys.stdin.readline().rstrip().split()))
q = int(sys.stdin.readline().rstrip())
count_dic = Counter(A)
SUM = sum(A)
for i in range(q):
  b, c = map(int, input().split())
  SUM += count_dic[b]*(c - b)
  count_dic[c] += count_dic[b]
  count_dic[b] = 0
  print(SUM)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_A = input().split()
q = int(input())
SUM = sum(map(int, list_A))
for i in range(q):
  b, c = input().split()
  dif = 0
  if b in list_A:
    num = list_A.count(b)
    list_A = [c if x == b else x for x in list_A]
    dif = num*(int(c) - int(b))
  else:
    pass
  SUM += dif
  print(SUM)

Fixed submission:
import sys
from collections import Counter
n = int(sys.stdin.readline().rstrip())
A = list(map(int, sys.stdin.readline().rstrip().split()))
q = int(sys.stdin.readline().rstrip())
count_dic = Counter(A)
SUM = sum(A)
for i in range(q):
  b, c = map(int, input().split())
  SUM += count_dic[b]*(c - b)
  count_dic[c] += count_dic[b]
  count_dic[b] = 0
  print(SUM)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_A = input().split()
q = int(input())
for i in range(q):
  SUM = 0
  b, c = input().split()
  if b in list_A:
    list_A = [c if x == b else x for x in list_A]
  else:
    pass
  SUM += sum(map(int, list_A))
  print(SUM)

Fixed submission:
import sys
from collections import Counter
n = int(sys.stdin.readline().rstrip())
A = list(map(int, sys.stdin.readline().rstrip().split()))
q = int(sys.stdin.readline().rstrip())
count_dic = Counter(A)
SUM = sum(A)
for i in range(q):
  b, c = map(int, input().split())
  SUM += count_dic[b]*(c - b)
  count_dic[c] += count_dic[b]
  count_dic[b] = 0
  print(SUM)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_A = input().split()
q = int(input())
for i in range(q):
  SUM = 0
  b, c = input().split()
  if b in list_A:
    list_A = [c if x == b else x for x in list_A]
  else:
    pass
  SUM += sum(map(int, list_A))
  print(SUM)

Fixed submission:
import sys
from collections import Counter
n = int(sys.stdin.readline().rstrip())
A = list(map(int, sys.stdin.readline().rstrip().split()))
q = int(sys.stdin.readline().rstrip())
count_dic = Counter(A)
SUM = sum(A)
for i in range(q):
  b, c = map(int, input().split())
  SUM += count_dic[b]*(c - b)
  count_dic[c] += count_dic[b]
  count_dic[b] = 0
  print(SUM)
Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
try:
  list_P = [int(p) for p in input().split()]
  list_not_P = [x for x in range(min(list_P)-1, max(list_P)+2) if not x in list_P]
  list_abs = [abs(x - i) for i in list_not_P]
  Index = list_abs.index(min(list_abs))
  print(list_not_P[Index])
except EOFError:
  print(x)

Fixed submission:
[X, N] = list(map(int, input().split()))
A = []
try:
  P = list(map(int, input().split()))
  list_int = [x for x in range(0, 102)]
  list_int_d = list(set(list_int) - set(P))
  list_int_d.sort()
  for i in list_int_d:
    A.append(abs(X - i))
  if 0 in A:
    print(X)
  else:
    Index = A.index(min(A))
    print(list_int_d[Index])
except EOFError:
  print(X)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
list_int = list(map(int, input().split()))
FLAG = True
ans = 1
for i in list_int:
  ans *= i
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n = int(input())
list_int = list(map(int, input().split()))
if 0 in list_int:
  print(0)
else:
  ans = 1
  for i in list_int:
    ans *= i
    if ans > 10**18:
      print(-1)
      break
    else:
      continue
  if ans <= 10**18:
    print(ans)
Buggy python submission (verdict: Runtime Error):
N = int(input())
if N = 1:
  print(1)
elif 2 <= N <= 3:
  print(2)
elif 4 <= N <= 7:
  print(4)
elif 8 <= N <= 15:
  print(8)
elif 16 <= N <= 31:
  print(16)
elif 32 <= N <= 63:
  print(32)
elif 64 <= N <= 100:
  print(64)

Fixed submission:
N = int(input())
if N == 1:
  print(1)
elif 2 <= N <= 3:
  print(2)
elif 4 <= N <= 7:
  print(4)
elif 8 <= N <= 15:
  print(8)
elif 16 <= N <= 31:
  print(16)
elif 32 <= N <= 63:
  print(32)
elif 64 <= N <= 100:
  print(64)
Buggy python submission (verdict: Time Limit Exceeded):
X = int(input())

b = 0
while 1:
    a = (X + b ** 5) ** (1/5)
    if a.is_integer() == True:
        break
    b = -b
    c = X + b ** 5
    if c >= 0:
        a = c ** (1/5)
        if a.is_integer() == True:
            break
    b = -b
    b += 1
print(int(a), b)

Fixed submission:
import sys

X = int(input())
for i in range(-118, 120):
    for j in range(-119, 119):
        if i ** 5 - j ** 5 == X:
            print(i, j)
            sys.exit(0)

Buggy python submission (verdict: Runtime Error):
X = int(input())

b = 0
while 1:
    a = (X + b ** 5) ** (1/5)
    if a.is_integer() == True:
        break
    b = -b
    a = (X + b ** 5) ** (1/5)
    if a.is_integer() == True:
        break
    b = -b
    b += 1
print(int(a), b)

Fixed submission:
import sys

X = int(input())
for i in range(-118, 120):
    for j in range(-119, 119):
        if i ** 5 - j ** 5 == X:
            print(i, j)
            sys.exit(0)

Buggy python submission (verdict: Runtime Error):
X = int(input())

b = 0
while 1:
    a = (X + b ** 5) ** (1/5)
    if a.is_integer() == True:
        break
    b = -b
    a = (X + (b) ** 5) ** (1/5)
    if a.is_integer() == True:
        break
    b = -b
    b += 1
print(int(a), b)

Fixed submission:
import sys

X = int(input())
for i in range(-118, 120):
    for j in range(-119, 119):
        if i ** 5 - j ** 5 == X:
            print(i, j)
            sys.exit(0)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
tmp = input()

WL = []
WL.append(tmp)
leng = 1

for i in range(N-1):
    flg = 1
    tmp = input()
    for j in range(leng):
        if tmp == WL[j]:
            flg = 0
            break
    if flg == 1:
        WL.append(tmp)
        leng += 1

print(leng)

Fixed submission:
N = int(input())

WL = []
for i in range(N):
    WL.append(input())

print(len(set(WL)))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
tmp = input()

WL = []
WL.append(tmp)
leng = 1

for i in range(N-1):
    flg = 1
    tmp = input()
    for j in range(leng):
        if tmp == WL[j]:
            flg = 0
            break
    if flg == 1:
        WL.append(tmp)
        leng += 1

print(leng)

Fixed submission:
N = int(input())

WL = []
for i in range(N):
    WL.append(input())

print(len(set(WL)))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h_list=list(map(int,input().split()))
cnt=0
mx=0
for i in range(len(h_list)):
    if mx>=(len(h_list)-i):
        break
    num=i
    cnt=0
    for num in range(num,len(h_list)-1):
        if h_list[num]>=h_list[num+1]:
            cnt+=1
        else:
            i=num+1
            break
    if cnt>mx:
        mx=cnt
print(mx)

Fixed submission:
n=int(input())
h_list=list(map(int,input().split()))
cnt=0
mx=0
i=0
while i<len(h_list):
    if mx>=(len(h_list)-i):
        break
    num=i
    cnt=0
    for j in range(num,len(h_list)-1):
        if h_list[j]>=h_list[j+1]:
            cnt+=1
        else:
            i=j
            break
    i+=1
    if cnt>mx:
        mx=cnt
print(mx)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h_list=list(map(int,input().split()))
cnt=0
mx=0
for i in range(len(h_list)):
    if mx>=(len(h_list)-i):
        break
    num=i
    cnt=0
    for num in range(num,len(h_list)-1):
        if h_list[num]>=h_list[num+1]:
            cnt+=1
        else:
            break
    if cnt>mx:
        mx=cnt
print(mx)

Fixed submission:
n=int(input())
h_list=list(map(int,input().split()))
cnt=0
mx=0
i=0
while i<len(h_list):
    if mx>=(len(h_list)-i):
        break
    num=i
    cnt=0
    for j in range(num,len(h_list)-1):
        if h_list[j]>=h_list[j+1]:
            cnt+=1
        else:
            i=j
            break
    i+=1
    if cnt>mx:
        mx=cnt
print(mx)

Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
h_list=list(map(int,input().split()))
cnt=0
mx=0
for i in range(len(h_list)):
    num=i
    cnt=0
    for num in range(num,len(h_list)-1):
        if h_list[num]>=h_list[num+1]:
            cnt+=1
        else:
            break
    if cnt>mx:
        mx=cnt
print(mx)

Fixed submission:
n=int(input())
h_list=list(map(int,input().split()))
cnt=0
mx=0
i=0
while i<len(h_list):
    if mx>=(len(h_list)-i):
        break
    num=i
    cnt=0
    for j in range(num,len(h_list)-1):
        if h_list[j]>=h_list[j+1]:
            cnt+=1
        else:
            i=j
            break
    i+=1
    if cnt>mx:
        mx=cnt
print(mx)
Buggy python submission (verdict: Runtime Error):
import numpy as np

n=int(input())
if n==1:
    print(0)
else:
    plist=list(range(1,n+1))
    qlist=list(range(2,n+1))
    qlist.append(1)
    parray=np.array(plist)
    qarray=np.array(qlist)
    rarray=parray%qarray
    sm=rarray.sum()
    print(sm)


Fixed submission:
import numpy as np

n=int(input())
print(int((n-1)*n//2))
"""
if n==1:
    print(0)
else:
    plist=list(range(1,n+1))
    qlist=list(range(2,n+1))
    qlist.append(1)
    parray=np.array(plist)
    qarray=np.array(qlist)
    rarray=parray%qarray
    sm=rarray.sum()
    print(sm)
"""

Buggy python submission (verdict: Runtime Error):
import numpy as np

n=int(input())
plist=list(range(1,n+1))
qlist=list(range(2,n+1))
qlist.append(1)
parray=np.array(plist)
qarray=np.array(qlist)
rarray=parray%qarray
sm=rarray.sum()
print(sm)

Fixed submission:
import numpy as np

n=int(input())
print(int((n-1)*n//2))
"""
if n==1:
    print(0)
else:
    plist=list(range(1,n+1))
    qlist=list(range(2,n+1))
    qlist.append(1)
    parray=np.array(plist)
    qarray=np.array(qlist)
    rarray=parray%qarray
    sm=rarray.sum()
    print(sm)
"""
Buggy python submission (verdict: Runtime Error):
INF = 10 ** 4 + 10

n = int(input())
H = list(map(int, input().split()))
DP = [INF] * n

def rec(i):
    if DP[i] < INF:
        return DP[i]

    if i == 0:
        return 0
    
    res = INF
    res = min(res, rec(i-1) + abs(H[i] - H[i-1]))
    if i > 1:
        res = min(res, rec(i-2) + abs(H[i] - H[i-2]))
    DP[i] = res
    return res

print(rec(n-1))

Fixed submission:
n = int(input())
H = list(map(int,input().split()))

Dp = [0] * n

Dp[1] = abs(H[1] - H[0])     

for i in range(2, n):
    Dp[i] = min(Dp[i-1] + abs(H[i] - H[i-1]), Dp[i-2] + abs(H[i] - H[i-2]))
    
print(Dp[-1])
Buggy python submission (verdict: Time Limit Exceeded):
N, W = map(int, input().split())
w = [0] * N
v = [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())
dp = [[0] * (W + 1) for _ in range(N + 1)]
for i in range(N):
    for sum_w in range(W + 1):
        if sum_w - w[i] >= 0:
            dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w - w[i]] + v[i])
        dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w])
print(dp[N][W])

Fixed submission:
N, W = map(int, input().split())
w = [0] * N
v = [0] * N
for i in range(N):
    w[i], v[i] = map(int, input().split())
dp = [[0] * (W + 1) for _ in range(N + 1)]
for i in range(N):
    for sum_w in range(W + 1):
        if sum_w - w[i] >= 0:
            dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w - w[i]] + v[i])
        dp[i+1][sum_w] = max(dp[i+1][sum_w], dp[i][sum_w])
print(dp[N][W])