Problem:
 Score : 500 points    Problem Statement There are N towns on a line running east-west.
The towns are numbered 1 through N , in order from west to east.
Each point on the line has a one-dimensional coordinate, and a point that is farther east has a greater coordinate value.
The coordinate of town i is X_i .  You are now at town 1 , and you want to visit all the other towns.
You have two ways to travel:    Walk on the line.
Your fatigue level increases by A each time you travel a distance of 1 , regardless of direction.    Teleport to any location of your choice.
Your fatigue level increases by B , regardless of the distance covered.    Find the minimum possible total increase of your fatigue level when you visit all the towns in these two ways.      Constraints  All input values are integers.  2≤N≤10^5  1≤X_i≤10^9  For all i(1≤i≤N-1) , X_i<X_{i+1} .  1≤A≤10^9  1≤B≤10^9         Input The input is given from Standard Input in the following format:  N  A  B  X_1  X_2  ...  X_N       Output Print the minimum possible total increase of your fatigue level when you visit all the towns.        Sample Input 1 4 2 5
1 2 5 7      Sample Output 1 11  From town 1 , walk a distance of 1 to town 2 , then teleport to town 3 , then walk a distance of 2 to town 4 .
The total increase of your fatigue level in this case is 2×1+5+2×2=11 , which is the minimum possible value.       Sample Input 2 7 1 100
40 43 45 105 108 115 124      Sample Output 2 84  From town 1 , walk all the way to town 7 .
The total increase of your fatigue level in this case is 84 , which is the minimum possible value.       Sample Input 3 7 1 2
24 35 40 68 72 99 103      Sample Output 3 12  Visit all the towns in any order by teleporting six times.
The total increase of your fatigue level in this case is 12 , which is the minimum possible value.

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))

ans = 0
for e1, e2 in zip(x, x[1:]):
    walk = (e2 - e1) * a
    if walk <= b:
        ans += walk
    else:
        ans += b

print(ans)

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))
c = 0
for i in range(1, n):
    if a * (x[i] - x[i - 1]) <= b:
        c += a * (x[i] - x[i - 1])
    else:
        c += b
print(c)

Solution (Python):
import sys
from io import StringIO
import unittest

doTest=0

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline
    n,a,b=list(map(int, readline().strip().split()))
    xx=list(map(int, readline().strip().split()))
    p=0
    for i in range(1,len(xx)):
        d=xx[i]-xx[i-1]
        p+=min(d*a,b)
    
    
    
    print(p)

    return

if doTest==0:
    resolve()
    sys.exit()

Solution (Python):
n,a,b = map(int, input().split())
x = list(map(int,input().split()))

ans = 0
for i in range(n-1):
  ans += min(a*(x[i+1]-x[i]), b)
  
print(ans)

Solution (Python):
def main():
    import sys
    
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations
    
    from bisect import bisect_left,bisect_right
    from math import floor, ceil
    

    

    N,A,B = map(int, input().split())
    X = list(map(int, input().split()))
    res = 0
    for i in range(N-1):
        if (X[i+1]-X[i])*A>B:
            res += B
        else:
            res += (X[i+1]-X[i])*A
    print(res)

if __name__ == '__main__':
    main()

Solution (Python):
n, a, b = [int(i) for i in input().split()]
x = [int(i) for i in input().split()]
h = 0
for i in range(n- 1):
    if (x[i + 1] - x[i]) * a >= b:
        h += b
    else:
        h += (x[i + 1] - x[i]) * a
print(h)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))

nowX = X[0]
ans = 0
for x in X[1:]:
    ans += min((x-nowX)*A, B)
    nowX = x
print(ans)

Solution (Python):



import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))



N, A, B = read_ints()
X = read_ints()


X_diff = [x-y for x,y in zip(X[1:],X[:-1])]
ans = 0
for d in X_diff:
    ans += min(B, d * A)
print(ans)

Solution (Python):



import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


import numpy as np
N, A, B = read_ints()
X = read_ints()


X_diff = np.diff(X)
ans = 0
for d in X_diff:
    ans += min(B, d * A)
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
 
N, A, B = [int(x) for x in input().split()]
X = [int(x) for x in input().split()]

ans = 0

for i in range(N - 1):
    if (X[i + 1] - X[i]) * A > B:
        ans += B
    else:
        ans += (X[i + 1] - X[i]) * A

print(ans)

Solution (Python):
N, A, B = list(map(int, input().split()))
X = list(map(int, input().split()))

DP = [0] * N

for i in range(1, N):
    DP[i] = min((X[i] - X[i-1]) * A, B) + DP[i-1]

print(DP[N-1])

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))

ans = 0

for n in range(N-1):
  if (X[n+1] - X[n]) * A > B:
    ans += B
  else:
    ans += (X[n+1] - X[n]) * A

print(ans)

Solution (Python):

import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, A: int, B: int, X: "List[int]"):
    print(sum(
        min((xj - xi) * A, B)
        for xi, xj in zip(X, X[1:])
    ))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = int(next(tokens))  
    B = int(next(tokens))  
    X = [int(next(tokens)) for _ in range(N)]  
    solve(N, A, B, X)


if __name__ == '__main__':
    main()

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))

tired=0
for i in range(n-1):
    if a*(x[i+1]-x[i])<=b:
        tired+=a*(x[i+1]-x[i])
    else:
        tired+=b
print(tired)

Solution (Python):
def main():
    towns, walk_fatigue, teleport_fatigue = map(int, input().split())
    town_location = list(map(int, input().split()))
    answer = 0
    for i in range(towns - 1):
        answer += min(teleport_fatigue, walk_fatigue * (town_location[i + 1] - town_location[i]))
    print(answer)


if __name__ == '__main__':
    main()

Solution (Python):
N, A, B, *X = map(int, open(0).read().split())
ans = sum(min((X[i]-X[i-1])*A,B) for i in range(1,N))
print(ans)

Solution (Python):
N, A, B, *X = map(int, open(0).read().split())
Y = []
ans = sum(min((X[i]-X[i-1])*A,B) for i in range(1,N))
print(ans)

Solution (Python):
n,a,b = map(int,input().split())
x = list(map(int,input().split()))

ans = 0

for i in range(n-1):
    ans += min(b, a * (x[i+1] - x[i]))

print(ans)

Solution (Python):
n,a,b = map(int,input().split())
l = list(map(int,input().split()))
ans = 0

for i in range(1,n):
  if (l[i]-l[i-1])*a >= b:
    ans += b
  else:
    ans += (l[i]-l[i-1])*a
print(ans)

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))
now = x[0]
ans = 0
for i in range(1, n):
    ans += min(a*(x[i] - now), b)
    now = x[i]
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))

ans = 0
for i in range(1, N):
    d = X[i] - X[i-1]
    ans += min(d * A, B)

print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = tuple(map(lambda x: int(x) * A, input().split()))
print(sum(min(X[i] - X[i - 1], B) for i in range(1, N)))

Solution (Python):
N, A, B = map(int, input().split())
*x, = map(int, input().split())
ans = 0
for i in range(1, N):
    ans += min([(x[i]-x[i-1])*A, B])
print(ans)

Solution (Python):
N,A,B = map(int,input().split())
List = list(map(int,input().split()))
cost = []
for i in range(N-1):
  cost.append(min(A*(List[i+1]-List[i]),B))
Answer = sum(cost)
print(Answer)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
dist = []
ans = 0

for i in range(N - 1):
	dist.append(X[i + 1] - X[i])
	
for i in range(N - 1):
	ans += min(dist[i] * A, B)
	
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
x = list(map(int, input().split()))
ans = 0
for i in range(1, N):
    ans += min((x[i] - x[i - 1]) * A, B)

print(ans)

Solution (Python):
N,A,B=map(int,input().split())
X=list(map(int,input().split()))
ret = 0
for i in range(1,N):
  ret += min(B, A*(X[i]-X[i-1]))
print(ret)

Solution (Python):
N,A,B=map(int,input().split())
X=list(map(int,input().split()))
import numpy as np
X=np.array(X)
print(sum(np.minimum((X[1:]-X[:N-1])*A , B)))

Solution (Python):
N,A,B = map(int,input().split())
X = [int(x) for x in input().split()]

ans = 0
for i in range(1,N):
	d = X[i]-X[i-1]
	ans += min(A*d, B)
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
ans = 0
for i in range(1, N):
  ans += min(A*(X[i]-X[i-1]), B)
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

N, A, B = map(int, input().split())
X = list(map(int, input().split()))

ans = 0

for i in range(len(X) - 1):
    if (X[i + 1] - X[i]) * A > B:
        ans += B
    else:
        ans += (X[i + 1] - X[i]) * A

print(ans)

Solution (Python):
N,A,B=map(int,input().split())
X=list(map(int,input().split()))
ans=0
for i in range(1,N):
    a=X[i]-X[i-1]
    b=a*A
    if b<B:
        ans+=b
    else:
        ans+=B
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
ans = 0
for i in range(N - 1):
    d = (X[i + 1] - X[i]) * A
    if d < B:
        ans += d
    else:
        ans += B

print(ans)

Solution (Python):
n,a,b = map(int,input().split())
xx = list(map(int,input().split()))

ans = 0
for i in range(n-1):
  ans += min((xx[i+1]-xx[i])*a, b)
print(ans)

Solution (Python):
n,a,b=map(int,input().split())
xs=list(map(int,input().split()))
l=[xs[i+1]-xs[i] for i in range(n-1)]
ans=[a*k if a*k < b else b for k in l]
print(sum(ans))

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    N, A, B = [int(x) for x in input().split()]
    X = [int(x) for x in input().split()]

    ans = 0
    for i, j in zip(X, X[1:]):
        ans += min((j - i) * A, B)

    print(ans)

    
    
    

if __name__ == '__main__':
    main()

Solution (Python):
n,a,b,*towns=map(int,open(0).read().split())

fatigue=0
for i in range(n-1):
    fatigue+=min(b,a*(towns[i+1]-towns[i]))
    
print(fatigue)

Solution (Python):
n,a,b = map(int,input().split())
towns = list(map(int,input().split()))

fatigue = 0
for i in range(n-1):
  d = towns[i+1] -towns[i]
  fatigue += min(d*a,b)
print(fatigue)

Solution (Python):
N,a,b=map(int,input().split())
X=list(map(int,input().split()))
cnt=0
for i in range(N-1):
  d=X[i+1]-X[i]
  if d*a>b:
    cnt+=b
  else:
    cnt+=d*a
print(cnt)

Solution (Python):
n,a,b = map(int, input().split())
x = list(map(int, input().split()))
diff = [x[i+1] - x[i] for i in range(n-1)]
ans = 0
for i in range(1,n):
    if diff[i-1] * a > b:
        ans += b
    else:
        ans += diff[i-1] * a

print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))

diffs = []
for i in range(len(X) - 1):
    left, right = X[i], X[i + 1]
    diffs.append(right - left)
costs = []
for diff in diffs:
    costs.append(min(diff * A, B))
print(sum(costs))

Solution (Python):
N, A, B = map(int , input().split())
X = list(map(int,input().split()))
now = X[0]
ans = 0
for i in range(1, len(X)):
    if (X[i] - now) * A > B:
        ans += B
    else:
        ans += (X[i] - now) * A
    now = X[i]
print(ans)

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))

hp = 0
good = min(a, b)
bad = max(a, b)

if good == a:
  for i in range(n):
    if i+1 == n:
      break
    if bad >= abs(x[i+1] - x[i])*good:
      hp += abs(x[i+1] - x[i]) * good
    else:
      hp += bad

else:
  for i in range(n):
    if i+1 == n:
      break
    if good >= abs(x[i+1] - x[i])*bad:
      hp += abs(x[i+1] - x[i]) * bad
    else:
      hp += good
print(hp)

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))

ans=0
for i in range(1,n):
 ans+=min((x[i]-x[i-1])*a,b)
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
dist = [x2 - x1 for x1, x2 in zip(X, X[1:])]
print(sum(min(B, A*d) for d in dist))

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))

ans = 0
for i in range(1, n):
    if a * (x[i]-x[i-1]) < b:
        ans += a * (x[i]-x[i-1])
    else:
        ans += b
print(ans)

Solution (Python):

n,a,b=map(int,input().split())
x=list(map(int,input().split()))
dist=[]

for i in range(n-1):
    dist.append(x[i+1]-x[i])
ans=0
for i in range(len(dist)):
    if dist[i]*a<b:
        ans+=dist[i]*a
    else:
        ans+=b
print(ans)

Solution (Python):
N,A,B=map(int,raw_input().split())
X=map(int,raw_input().split())
print sum(min(B,A*(X[i+1]-X[i]))for i in range(N-1))

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
ans = 0
pos = X[0]
for i in range(1, N):
    ans += min(A * (X[i] - pos), B)
    pos = X[i]
print(ans)

Solution (Python):

import sys
INF = float("inf")


def solve(N: int, A: int, B: int, X: "List[int]"):
    tot = 0
    for i in range(N-1):
        sub = X[i+1]-X[i]
        if sub*A < B:
            tot += sub*A
        else:
            tot += B
    print(tot)

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = int(next(tokens))  
    B = int(next(tokens))  
    X = [int(next(tokens)) for _ in range(N)]  
    solve(N, A, B, X)


if __name__ == '__main__':
    main()

Solution (Python):
def solve():
    N, A, B = map(int, input().split())
    Xi = tuple(map(int, input().split()))

    
    

    total = 0
    for i in range(1, N):
        total += min((Xi[i] - Xi[i - 1]) * A, B)

    return total


if __name__ == '__main__':
    res = solve()
    print(res)

Solution (Python):

N, A, B = map(int, input().split())
X = list(map(int, input().split()))
ans = 0
thres = B // A
for i in range(N-1):
    x = X[i+1] - X[i]
    if x > thres:
        ans += B
    else:
        ans += A * x
print(ans)

Solution (Python):
n, a, b = map(int, input().split())
*x, = map(int, input().split())

ans = 0
for i in range(n-1):
    ans += min(abs(x[i+1]-x[i])*a, b)
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))

fatigue = 0
for i in range(N-1):
    fatigue += min((X[i+1]-X[i])*A, B)

print(fatigue)

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
res = 0
for i in range(n-1):
    t = x[i+1]-x[i]
    res += min(t*a,b)
print(res)

Solution (Python):
import sys
input = sys.stdin.readline
n,a,b=map(int,input().split())
X=list(map(int,input().split()))
ans=0
for i in range(n-1):
    ans+=min((X[i+1]-X[i])*a,b)
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))

ans = 0
for i in range(N-1):
    dist = X[i+1] - X[i]
    if dist * A <= B:
        ans += dist * A
    else:
        ans += B
print(ans)

Solution (Python):
N, A, B = map(int,input().split())
X = [int(i) for i in input().split()]
p = X[0]
ans = 0
for i in range(1, N):
  ans += min(B, A*(X[i]-p))
  p = X[i]
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
L = list(map(int, input().split()))
D = [A * (L[i+1] - L[i]) for i in range(N - 1)]
S = 0
for i in range(N - 1):
  if D[i] > B:
    S += B
  else:
    S += D[i]
print(S)

Solution (Python):
[n,a,b]=list(map(int,input().split()))
xlist=list(map(int,input().split()))
ans=0
for i in range(1,n):
    walk=(xlist[i]-xlist[i-1])*a
    if (walk<b): 
        ans+=walk
    else:
        ans+=b
ans=int(ans)
print(ans)

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

N, X, Y = MAP()
A = LIST()

ans = 0
for i in range(N-1):
    ans += min((A[i+1] - A[i]) * X, Y)
print(ans)

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))

ans = 0
for i in range(n-1):
    ans += min(b, a*(x[i+1]-x[i]))

print(ans)

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,hypot,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,A,B = MI()
    X=LI()
    now = X[0]
    ans = 0
    for x in X:
        ans += min((x-now)*A, B)
        now = x
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
n,a,b = map(int,input().split())
x = list(map(int,input().split()))
ans = 0
for i in range(1,n):
  ans += min((x[i]-x[i-1])*a,b)
print(ans)

Solution (Python):
N, A, B = list(map(int, input().split()))
X = list(map(int, input().split()))
xp = X[0]
ans = 0
for x in X[1:]:
    ans += min(A*(x-xp), B)
    xp = x
print(ans)

Solution (Python):
N,A,B=[int(x) for x in input().rstrip().split()]
l=[int(x) for x in input().rstrip().split()]
ans=0

for i in range(N-1):
    if((abs(l[i]-l[i+1]))*A)<=B:
        ans+=(abs(l[i]-l[i+1]))*A
    
    else:
        ans+=B
print(ans)

Solution (Python):

N,A,B = map(int, input().split())
X_list = [int(e) for e in input().split()]

diff_X_list = [X_list[i]-X_list[i-1] for i in range(1,N)]

ans = 0
for diff_X in diff_X_list:
    if diff_X * A >= B:
        ans += B
    else:
        ans += diff_X * A
        
print(ans)

Solution (Python):
n, a, b = map(int, input().split())
X = list(map(int, input().split()))

ans = 0
for i in range(1,n):
    walk = (X[i] - X[i-1]) * a
    tel = b
    if walk >= tel:
        ans += tel
    else:
        ans += walk
print(ans)

Solution (Python):
n,a,b = map(int, input().split())
x = list(map(int, input().split()))
d = [x[i+1]-x[i] for i in range(n-1)]
ans = sum([min(i*a,b)for i in d])
print(ans)

Solution (Python):
n,a,b = map(int,input().split())
xl = list(map(int,input().split()))

ans = 0
for i in range(n-1):
    diff = xl[i+1] - xl[i]
    ans += min(diff*a,b)

print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
D = [0]
for i in range(N-1):
    D.append(X[i+1]-X[i])

ans = 0
for i in range(1, N):
    ans += min(A*D[i], B)

print(ans)

Solution (Python):
import sys
import math

if sys.platform in ['ios','win32','darwin']:
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

N, A, B = MAP()
C = MAP()

ans = 0
for i in range(N-1):
	dist = C[i+1]-C[i]
	if A*dist > B:
		ans += B
	else:
		ans += A*dist

print(ans)

Solution (Python):
N, A, B  = map(int, input().split())

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

cost = 0

for i in range(N-1):
    
    
    cost += min((X[i+1]-X[i])*A, B)
    
print(cost)

Solution (Python):
import sys

n, a, b, *x = map(int, sys.stdin.read().split())

def main():
    border = (b + a - 1) // a

    res = 0
    for i in range(n-1):
        d = x[i+1] - x[i]
        if d >= border:
            res += b
        else:
            res += a * d

    return res

if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
ans = 0
maxwalk = b//a
for i in range(n-1):
  if x[i+1]-x[i]>maxwalk:
    ans+=b
  else:
    ans+=(x[i+1]-x[i])*a
print(ans)

Solution (Python):
N,A,B=map(int,input().split())
X=list(map(int,input().split()))
ans=0

for i in range(N-1):
    l=(X[i+1]-X[i])*A
    if l>B:
        ans+=B
    else:
        ans+=l

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
N, A, B = [int(x) for x in input().strip().split()]
X = [int(x) for x in input().strip().split()]
p = X[0]
ans = 0
for x in X[1:]:
    c = (x - p) * A
    if c <= B:
        ans += c
    else:
        ans += B
    p = x
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))

arr = list()
for i, x in enumerate(X):
    if i == 0:
        continue
    arr.append(min((X[i] - X[i - 1]) * A, B))
print(sum(arr))

Solution (Python):
n, a, b = map(int, input().split(' '))
x = list(map(int, input().split(' ')))

t = 0
for i in range(n - 1):
    d = x[i + 1] - x[i]
    t += min(a * d, b)

print(t)

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))

dp = 0
for i in range(1, n):
    dp = min((x[i] - x[i-1]) * a + dp, dp + b)
print(dp)

Solution (Python):
n,a,b=map(int,input().split())

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

c=0
for i in range(n-1):
    c+=min((x[i+1]-x[i])*a,b)
print(c)

Solution (Python):
import sys
n, a, b = [int(i) for i in sys.stdin.readline().split()]
x_ls = [int(i) for i in sys.stdin.readline().split()]
diff_ls = []
for i, x in enumerate(x_ls[:-1]):
    diff_ls.append((x_ls[i+1] - x) * a)
diff_ls = [i if i < b else b for i in diff_ls]
print(sum(diff_ls))

Solution (Python):
import sys

readline = sys.stdin.buffer.readline


def main():
    N, A, B = map(int, readline().split())
    X = list(map(int, readline().split()))

    c = 0
    for i in range(N - 1):
        c += min(A * (X[i + 1] - X[i]), B)

    print(c)


main()

Solution (Python):
N, A, B = map(int, input().split())
X = [int(a) for a in input().split()]

print(sum([min((X[i]-X[i-1]) * A, B) for i in range(1, N)]))

Solution (Python):

N,A,B = map(int, input().split())

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

ans = 0
for i in range(1,N):
    if (X[i] - X[i-1]) * A <= B:
        ans += (X[i] - X[i-1]) * A
    else:
        ans += B
print(ans)

Solution (Python):

import sys


def solve(N: int, A: int, B: int, X: "List[int]"):
    distance = []
    for i in range(1,N):
        distance.append(X[i]-X[i-1])
    
    answer =0 
    for d in distance:
        answer += min(d*A,B)
    print(answer)

    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    A = int(next(tokens))  
    B = int(next(tokens))  
    X = [int(next(tokens)) for _ in range(N)]  
    solve(N, A, B, X)

if __name__ == '__main__':
    main()

Solution (Python):
N, A, B = map(int, input().split())
X = [int(i) for i in input().split()]
ans = 0
for i in range(N-1):
    ans += min((X[i+1]-X[i])*A, B)
print(ans)

Solution (Python):
N,A,B=map(int,input().split())
X=list(map(int,input().split()))
ans=0
for i in range(1,len(X)):
  ans+=min((X[i]-X[i-1])*A,B)
  
print(ans)

Solution (Python):
n, a, b = map(int, input().split())
X = list(map(int, input().split()))
ans = 0
m = b // a
for i in range(n-1):
  d = X[i+1] - X[i]
  if d > m:
    ans += b
  else:
    ans += a*d
print(ans)

Solution (Python):
n,a,b = map(int, input().split())
x = list(map(int, input().split()))
h = 0
for i in range(n-1):
    c = x[i+1] - x[i]
    h += min(c*a,b)
print(h)

Solution (Python):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))
ans = 0

for i in range(len(x)-1):
    here = x[i]
    there = x[i+1]
    if (there - here) * a < b:
        ans += (there - here) * a
    else:
        ans += b

print(ans)

Solution (Python):
from sys import stdin

n,a,b = [int(x) for x in stdin.readline().rstrip().split()]
li = list(map(int,stdin.readline().rstrip().split()))

point = 0
for i in range(n-1):
    if (li[i+1]-li[i])*a < b:
        point += (li[i+1]-li[i])*a
    else:
        point += b

print(point)

Solution (Python):
n, a, b = map(int, input().split())
li = list(map(int, input().split()))
fatigue = 0
for i in range(n-1):
    fatigue += min(b, a*(li[i+1]-li[i]))

print(fatigue)

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
y=[]
for i in range(n-1):
    y.append(a*(x[i+1]-x[i]))
ans=0
for i in y:
    if i<=b:
        ans+=i
    else:
        ans+=b

print(ans)

Solution (Python):
N,A,B = map(int, input().split())
X = [int(x) for x in input().split()]

ans = 0
for i in range(1, N):
    ans += min((X[i]-X[i-1])*A, B)
    
print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def resolve():
    n,a,b=map(int,input().split())
    X=list(map(int,input().split()))
    ans=0
    for i in range(n-1):
        ans+=min(b,a*(X[i+1]-X[i]))
    print(ans)
resolve()

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
print(sum([min(A*(X[i + 1] - X[i]), B) for i in range(N - 1)]))

Solution (Python):

n, a, b = map(int, input().split())
arr = list(map(int, input().split()))

ans = 0
for i in range(1, n):
    ans += min((arr[i] - arr[i - 1]) * a, b)

print(ans)

Solution (Python):
N, A, B = map(int, input().split())
Xlist = list(map(int, input().split()))
cost = 0
for i in range(1, N):
    dis = Xlist[i] - Xlist[i - 1]
    cost += min(dis * A, B)
print(cost)

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
ans=0
for i in range(n-1):
    ans+=min(b,(x[i+1]-x[i])*a)
print(ans)

Solution (Python):
N,A,B = map(int,input().split())
X = list(map(int,input().split()))
ans = 0
for i in range(N-1):
  ans += min((X[i+1]-X[i])*A,B)
print(ans)

Solution (Python):
N,A,B = map(int,input().split())
X = list(map(int,input().split()))
ans = 0
for i in range(N-1):
    x = X[i]
    y = X[i+1]
    a = (y-x)*A
    if a <= B:
        ans += a
    else:
        ans += B
print(ans)

Solution (Python):
n,a,b = map(int,input().split())
*l, = map(int,input().split())
ans = 0
for i in range(len(l)-1):
    ans += min(b,a*(l[i+1]-l[i]))
print(ans)

Solution (Python):
n,a,b=[int(i) for i in input().split()]
x=[int(i) for i in input().split()]

dif=[x[ind+1]-x[ind] for ind in range(len(x)-1)]
c=0
for i in dif:
    if(i*a > b):
        c+=b
    else:
        c+=i*a
print(c)

Solution (Python):
n,a,b = map(int,input().split())
c = list(map(int,input().split()))
ans = 0
for i in range(n-1):
    if (c[i+1] - c[i] ) * a >= b:
        ans += b
    else:
        ans += (c[i+1] - c[i] ) * a
print(ans)

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
ans=0
for i in range(n-1):
  if (x[i+1]-x[i])*a>=b:
    ans+=b
  else:
    ans+=(x[i+1]-x[i])*a
print(ans)

Solution (Python):

N, A, B = map(int, input().split(' '))
X = list(map(int, input().split(' ')))

diffs = [X[i+1] - X[i] for i in range(N-1)]
ans = 0
for diff in diffs:
    
    ans += min(A*diff, B)

print (ans)

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
ans=0
for i in range(1,n):
    ans+=min(b,(x[i]-x[i-1])*a)
print(ans)

Solution (Python):

import sys
input = sys.stdin.readline


N,A,B = map(int,input().split())
X = list(map(int,input().split()))

ans = 0
for i in range(N-1):
    ans += min(B, A*(X[i+1]-X[i]))

print(ans)

Solution (Python):
def examD():
    N, A, B = LI()
    X = LI()
    cur = int(0)
    for i in range(N-1):
        cur += min(A*(X[i+1]-X[i]),B)
    print(cur)

import sys
import copy
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examD()

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
ans = 0
for i in range(1, N):
    way = min(A * (X[i] - X[i - 1]), B)
    ans += way
print(ans)

Solution (Python):
N,A,B = map(int,input().split())
Data = list(map(int,input().split()))
ans = 0
for i in range(len(Data)-1):
    d = Data[i+1]-Data[i]
    ans += min(A*d,B)
print(ans)

Solution (Python):
import numpy as np

N, A, B = map(int, input().split())
X = np.array(input().split(), np.int64)

answer = np.minimum((X[1:] - X[:-1]) * A, B)

print(answer.sum())

Solution (Python):
n,a,b = map(int,input().split())
x = [int(i) for i in input().split()]
ans = 0
for i in range(n-1):
    if (x[i+1] - x[i])*a >= b:
        ans += b
    else:
        ans += (x[i+1] - x[i])*a
print(ans)

Solution (Python):
n, a, b = map(int,input().split())
x = list(map(int, input().split()))
ans = 0
for i in range(n-1):
    ans +=  min((x[i+1] - x[i])*a, b)
print(ans)

Solution (Python):
n, a, b = map(int, input().split())
L = [int(i) for i in input().split()]

t = 0
for i in range(n-1):
  if (L[i+1] - L[i])*a > b:
    t += b
  else:
    t += (L[i+1] - L[i])*a

print(t)

Solution (Python):
N,A,B=map(int,input().split())
X=list(map(int,input().split()))

d=[min(A*(X[i+1]-X[i]),B) for i in range(N-1)]

print(sum(d))

Solution (Python):
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
c=0
for i in range(n-1):
  if (x[i+1]-x[i])*a<b:
    c=c+(x[i+1]-x[i])*a
    i=i+1
  else:
    c=c+b
    i=i+1
print(c)

Solution (Python):
n,a,b = map(int,input().split())
X = list(map(int,input().split()))

fatigue = 0
for i in range(1,n):
    fatigue += min((X[i]-X[i-1])*a,b)
    
print(fatigue)

Solution (Python):
n,a,b=map(int, input().split())
x=list(map(int, input().split())) 
ans=0

for i in range(1,n):
    v=(x[i]-x[i-1])*a
    ans+=min(v,b)
print(ans)

Solution (Python):
N, A, B = map(int, input().split())
X = list(map(int, input().split()))
ans = 0
for i in range(N - 1):
    if (X[i + 1] - X[i]) * A > B:
        ans += B
    else:
        ans += (X[i + 1] - X[i]) * A
print(ans)