Buggy python submission (verdict: Runtime Error):
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
min = 1000000000
min_c = 0
max_dif = 0
max_dif_c = 0
for i in range(n):
    if a[i] < min:
        min = a[i]
        min_c = 1
        continue
    elif a[i] == min:
        min_c += 1
        continue
    if a[i] - min > max_dif:
        max_dif = a[i] - min
        max_dif_c = 1
    elif a[i] - min == max_dif:
        max_dif_c += 1
c = min([min_c, max_dif_c])
print(str(c))


Fixed submission:
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
min_a = 1000000000
max_dif = 0
max_dif_c = 0
for i in range(n):
    if a[i] < min_a:
        min_a = a[i]
    elif a[i] - min_a > max_dif:
        max_dif = a[i] - min_a
        max_dif_c = 1
    elif a[i] - min_a == max_dif:
        max_dif_c += 1
print(str(max_dif_c))

Buggy python submission (verdict: Runtime Error):
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
min = 1000000000
min_c = 0
max_dif = 0
max_dif_c = 0
for i in range(n):
    if a[i] < min:
        min = a[i]
        min_c = 1
    elif a[i] == min:
        min_c += 1
    if a[i] - min > max_dif:
        max_dif = a[i] - min
        max_dif_c = 1
    elif: a[i] - min == max_dif:
        max_dif_c += 1
c = min([min_c, max_dif_c])
print(str(c))


Fixed submission:
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
min_a = 1000000000
max_dif = 0
max_dif_c = 0
for i in range(n):
    if a[i] < min_a:
        min_a = a[i]
    elif a[i] - min_a > max_dif:
        max_dif = a[i] - min_a
        max_dif_c = 1
    elif a[i] - min_a == max_dif:
        max_dif_c += 1
print(str(max_dif_c))

Buggy python submission (verdict: Runtime Error):
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
c = 0
max_dif = 0
for i in range(n):
    for j in range(i + 1, n):
        if a[j] - a[i] > max_dif:
            c = 1
            max_dif = a[j] - a[i]
        elif: a[j] - a[i] == max_dif:
            c += 1
print(str(c))


Fixed submission:
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
min_a = 1000000000
max_dif = 0
max_dif_c = 0
for i in range(n):
    if a[i] < min_a:
        min_a = a[i]
    elif a[i] - min_a > max_dif:
        max_dif = a[i] - min_a
        max_dif_c = 1
    elif a[i] - min_a == max_dif:
        max_dif_c += 1
print(str(max_dif_c))

Buggy python submission (verdict: Runtime Error):
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
c = 0
max_dif = 0
for i in range(n):
    for j in range(i + 1, n):
        if a[j] - a[i] > max_dif:
            c = 1
            max_dif = a[j] - a[i]
        elif: a[j] - a[i] == max_dif:
            c += 1
print(c)


Fixed submission:
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
min_a = 1000000000
max_dif = 0
max_dif_c = 0
for i in range(n):
    if a[i] < min_a:
        min_a = a[i]
    elif a[i] - min_a > max_dif:
        max_dif = a[i] - min_a
        max_dif_c = 1
    elif a[i] - min_a == max_dif:
        max_dif_c += 1
print(str(max_dif_c))

Buggy python submission (verdict: Runtime Error):
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
c = 0
max_dif = 0
for i in range(n):
    for j in range(i, n):
        if a[j] - a[i] > max_dif:
            c = 1
            max_dif = a[j] - a[i]
        elif: a[j] - a[i] == max_dif:
            c += 1
print(c)


Fixed submission:
n, t = list(map(int, input().split()))
a = list(map(int, input().split()))
min_a = 1000000000
max_dif = 0
max_dif_c = 0
for i in range(n):
    if a[i] < min_a:
        min_a = a[i]
    elif a[i] - min_a > max_dif:
        max_dif = a[i] - min_a
        max_dif_c = 1
    elif a[i] - min_a == max_dif:
        max_dif_c += 1
print(str(max_dif_c))