input('').split()

A = [int(x) for x in input('').split()]

max = 0

count = 0

pl = 0

msp = A[0]

for i in range(1,len(A)):

  pl_t = pl + A[i] - A[i-1]

  if pl_t <= 0:

    pl = 0

  else:

    pl = pl_t

    if max < pl_t:

      max = pl_t

      count = 1

    elif max == pl_t:

      count += 1

print(count)
eval(input())

A=list(map(int,input().split()))

d,c,s=0,0,A[0]

for x in A[1:]:

 s=min(s,x)

 D=x-s

 if d<D:

  d,c=D,1

 elif D==d:

  c+=1

print(c)
input("").split()
A = [int(x) for x in input("").split()]
max = 0
count = 0
pl = 0
msp = A[0]
for i in range(1, len(A)):
    pl_t = pl + A[i] - A[i - 1]
    if pl_t <= 0:
        pl = 0
    else:
        pl = pl_t
        if max < pl_t:
            max = pl_t
            count = 1
        elif max == pl_t:
            count += 1
print(count)

eval(input())
A = list(map(int, input().split()))
d, c, s = 0, 0, A[0]
for x in A[1:]:
    s = min(s, x)
    D = x - s
    if d < D:
        d, c = D, 1
    elif D == d:
        c += 1
print(c)

-input("").split() -A = [int(x) for x in input("").split()] -max = 0 -count = 0 -pl = 0 -msp = A[0] -for i in range(1, len(A)): -    pl_t = pl + A[i] - A[i - 1] -    if pl_t <= 0: -        pl = 0 -    else: -        pl = pl_t -        if max < pl_t: -            max = pl_t -            count = 1 -        elif max == pl_t: -            count += 1 -print(count) +eval(input()) +A = list(map(int, input().split())) +d, c, s = 0, 0, A[0] +for x in A[1:]: +    s = min(s, x) +    D = x - s +    if d < D: +        d, c = D, 1 +    elif D == d: +        c += 1 +print(c)