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()))
Y=[ X[i+1]-X[i] for i in range(N-1)]
ans=0

for move in Y:
  ans += min(move*A,B)
  
print(ans)

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

for move in Y:
  ans += min(move*A,B)
  
print(ans)

Solution (Python):

import math
import operator as op
from functools import reduce
from fractions import Fraction as frac




def ncr(n, r):
    r = min(r, n-r)
    numer = reduce(op.mul, range(n, n-r, -1), 1)
    denom = reduce(op.mul, range(1, r+1), 1)
    return numer / denom
    

def rd(p):
    if(p==0):
        return input()
    if(p==1):
        return int(input())
    if(p==2):
        return map(int,input().split())
    if(p==3):
        return list(map(int,input().split()))



global par


def find(u):
    if(par[u]<0):
        return u
    else:
        return find(par[u])
def uni(x,y):
    u=find(x)
    v=find(y)
    if u==v:
        return
    if(par[u]<par[v]):
        par[u]+=par[v]
        par[v]=u
    else:    
        par[v]+=par[u]
        par[u]=v

        

t=1
for term in range(1,t+1):
    n,a,b=rd(2)
    X=rd(3)
    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()))

ans = 0
for i in range(N - 1):
    dist = X[i + 1] - X[i]
    if dist * A >= B:
        ans += B
    else:
        ans += dist * 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(a*(x[i+1]-x[i]),b)

print(ans)

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

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

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

print(sum(min(b, (x[i+1] - x[i]) * a) for i in range(n-1)))

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

sum=0

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

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 += (x[i+1]-x[i]) * a
    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(1, n):
    d = X[i]-X[i-1]
    if a*d < b:
        ans += a*d
    else:
        ans += b

print(ans)

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

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

distances = [i - j for i, j in zip(X[1:], X[:-1])]

fatigue = 0
for d in distances:
    fatigue += min(d * 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(n-1):
  ans+=min((x[i+1]-x[i])*a,b)
print(ans)

Solution (Python):
from sys import stdin 
n,a,b = [int(x) for x in stdin.readline().rstrip().split()]
x = [int(x) for x in stdin.readline().rstrip().split()]
ans = 0
for i in range(n-1):
    ans += min(a*(x[i+1]-x[i]),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):
  ans += min(a*(X[i+1] - X[i]), b)
print(ans)

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

Solution (Python):
import sys

input=sys.stdin.readline

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

data=[]
for i in range(0,N-1):
    data.append(A*(X[i+1]-X[i]))

data.sort(reverse=True)

ans=sum(data)
s=sum(data)
for i in range(0,N-1):
    s=s-data[i]+B
    ans=min(ans,s)

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):
import numpy as np
N, A, B = map(int, input().split())
X = np.array(list(map(int, input().split())))
X -= X[0]
D = X[1:]-X[:-1]
ans = np.sum(np.minimum(D*A, B))
print(ans)

Solution (Python):
N,A,B,*X=map(int,open(0).read().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(" "));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(" "))
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(" "))
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):
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]
    ans += min(dist * A,B)

print(ans)

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

cur = x[0]
count = 0
for i in x[1:]:
    count += min((i - cur) * a, b)
    cur = i

print(count)

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

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

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

Solution (Python):
n,a,b = [int(i) for i in 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 += (x[i+1]-x[i])*a
    else: ans += b
print(ans)

Solution (Python):
N, A, B, *X = map(int, open(0).read().split())
ans = 0
cur = X[0]
for i in range(1, N):
    x = X[i]
    cost_a = (x - cur) * A
    ans += min(cost_a, B)
    cur = x
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 a*(x[i+1] - x[i]) <= b:
		ans += a*(x[i+1] - x[i])
	else:
		ans += b
print(ans)

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

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

def main():
    for i in range(1,N):
        yield min((X[i] - X[i-1])*A, B)


print(sum(main()))

Solution (Python):
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):
    l = x[i]
    r = x[i+1]
    if (r-l)*a<b:
        ans +=(r-l)*a
    else:
        ans+=b
print(ans)

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

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(a * (x[i + 1] - x[i]), b)
print(ans)

Solution (Python):
def main():
    N, A, B = (int(i) for i in input().split())
    X = [int(i) for i in input().split()]
    diff = [(X[i+1] - X[i])*A if (X[i+1] - X[i])
            * A < B else B for i in range(N-1)]
    print(sum(diff))


if __name__ == '__main__':
    main()

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7

n, a, b = MAP()
x = LIST()
ans = 0
for i in range(1, n):
    tmp = x[i] - x[i - 1]
    if tmp * a < b:
        ans += tmp * a
    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(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()))
c=0
for i in range(n-1):
    if a*(x[i+1]-x[i])>b:
        c+=b
    else:
        c+=a*(x[i+1]-x[i])
print(c)

Solution (Python):
n,a,b = map(int,input().split())
ans = 0
current = 0
for x in map(int,input().split()):
    if current>0:
        ans += min(a*(x-current),b)
    current=x
print(ans)

Solution (Python):
from sys import stdin
N,A,B = [int(x) for x in stdin.readline().rstrip().split()]
X = [int(x) for x in stdin.readline().rstrip().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())

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

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

print(fatigue)

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

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

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

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

print(ans)

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

Solution (Python):
kaz , a , b = map(int,input().split(" "))
cou = 0
mac = list(map(int,input().split(" ")))

for i in range(kaz-1):
    if (mac[i+1] - mac[i])*a > b:
        cou += b
    else:
        cou += (mac[i+1] - mac[i])*a
        
print(cou)

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
    if walk < b:
        ans += walk
    else:
        ans += b
print(ans)

Solution (Python):

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

c = 0
s = l[0]
for i in l:
    c += min((i-s)*a, b)
    s = i
print(c)

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+=b
    else:
        ans+=(x[i]-x[i-1])*a
print(ans)

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

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

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

Solution (Python):



from fractions import gcd 
from functools import reduce
import sys
sys.setrecursionlimit(200000000)
from inspect import currentframe




def printargs2err(*args):
    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}
    print(', '.join(names.get(id(arg),'???')+' : '+repr(arg) for arg in args),file=sys.stderr)
def debug(x):
    print(x,file=sys.stderr)
def printglobals():
    for (symbol, value) in globals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)
def printlocals():
    for (symbol, value) in locals().items():
        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)

def pin(type=int):
    return map(type,input().split())



def modular_w_binary_method (n,m,p):
    ans=1 if n>0 else 0
    while(p>0):
        if p%2==1:
            ans=(ans*n)%m
        n=(n**2)%m
        p//=2
    return ans

"""
    フェルマーの小定理より a**(p)%p==a isTrue
    これを利用すれば a**(p-2)%p==a**(-1) isTrue
    元と逆元とをかけてpで割れば1が余るよ！
"""
def modular_inverse(a,prime):
    return(modular_w_binary_method(a,prime,prime-2))

def conbination(n,a,mod=10**9+7):
    
    res=1 
    for s in range(a):
        res=(res*(n-s)*(modular_inverse(s+1,mod)))%mod

        
    return res

"""
"""




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


"""


"""
"""
お前カッコ閉じるの忘れてるだろ
"""

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

ans = 0

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

print(ans)

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
n,a,b = map(int,readline().split())
x = list(map(int,readline().split()))

ans = 0

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

print(ans)

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

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

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

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

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

Solution (Python):
N,A,B = list(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):
n, a, b = map(int,input().split())
x = list(map(int,input().split()))

d = []
for i in range(n-1):
  d.append(x[i+1]-x[i])

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

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

Solution (Python):
n, a, b, *x = map(int, open(0).read().split())
ans = 0
t = x.pop(0)
for i in x:
    if a*(i-t)>b: ans += b
    else: ans += a*(i-t)
    t = i
print(ans)

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

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

print(ans)

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

dp=[0]*n

for i in range(1,n):
    prev=x[i-1]
    nxt =x[i]
    walk = a*(nxt-prev)
    tele = b

    if walk > tele:
        dp[i] = dp[i-1] + tele
    else:
        dp[i] = dp[i-1] + walk

print(dp[n-1])

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

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):
import bisect
def MLI():
    return map(int, open(0).read().split())

def main():
    N, A, B, *X = MLI()
    
    ret = 0
    for s, e in zip(X[:-1], X[1:]):
        diff = e - s
        if diff * A < B:
            ret += diff * A
        else:
            ret += B
            
    print(ret)
            

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(N-1):
    d = X[i+1]-X[i]
    if d*A >= B:
        ans += B
    else:
        ans += d*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):
    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
prev_x = X[0]
for i in range(1, N):
    walk_cost = A * (X[i] - prev_x)
    if walk_cost < B:
        ans += walk_cost
    else:
        ans += B
    prev_x = 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(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,N):
    ans += min(B,A*(X[i]-X[i-1]))
print(ans)

Solution (Python):
N,A,B = map(int,input().split())
X = list(map(int,input().split()))
X = [i-X[0] for i in X]
X.pop(0)
now = 0
count = 0
for i in X:
    if A*(i-now) < B:
        count += A*(i-now)
    else:
        count += B
    now = i
print(count)

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):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))

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

print(ans)

Solution (Python):
from _collections import deque
from _ast import Num


def parser():
    while 1:
        data = list(input().split(' '))
        for number in data:
            if len(number) > 0:
                yield (number)


input_parser = parser()


def gw():
    global input_parser
    return next(input_parser)


def gi():
    data = gw()
    return int(data)


MOD = int(1e9 + 7)

import numpy
from collections import deque
from math import sqrt
from math import floor


"""
need to consider the case that ticket is not enough to lower everything
"""

N = gi()
A = gi()
B = gi()

X = [0] * N
for i in range(N):
    X[i] = gi()

ans = 0

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

print(ans)

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

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

ans = 0

for i in range(1, N):
    x = X[i] - X[i - 1]
    ans += min((x * 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):
    x = X[i] - X[i - 1]
    ans += min((x * 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):
    x = X[i] - X[i - 1]
    
    if (x * A) >= B:
        ans += B
    else:
        ans += 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):
    if (X[i]-X[i-1])*A >= B:
        ans += B
    else:ans += (X[i]-X[i-1])*A
print(ans)

Solution (Python):
N, A, B, *X = map(int, open(0).read().split())
ans = 0
for i in range(N-1):
  if (X[i+1] - X[i]) * A < B:
    ans += (X[i+1] - X[i]) * A
  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):
  ans+=min(a*(x[i+1]-x[i]),b)
print(ans)

Solution (Python):
class UnionFind():
   
   
   def __init__(self, n):
       self.n = n
       
       
       self.root = [-1]*(n+1)
       
       self.rnk = [0]*(n+1)
   
   def Find_Root(self, x):
       if(self.root[x] < 0):
           return x
       else:
           
           self.root[x] = self.Find_Root(self.root[x])
           return self.root[x]
   
   def Unite(self, x, y):
       
       x = self.Find_Root(x)
       y = self.Find_Root(y)
       
       if(x == y):
           return
       
       elif(self.rnk[x] > self.rnk[y]):
           self.root[x] += self.root[y]
           self.root[y] = x
       else:
           self.root[y] += self.root[x]
           self.root[x] = y
           
           if(self.rnk[x] == self.rnk[y]):
               self.rnk[y] += 1
   
   def isSameGroup(self, x, y):
       return self.Find_Root(x) == self.Find_Root(y)
   
   def Count(self, x):
       return -self.root[self.Find_Root(x)]
n,a,b=map(int,input().split())
x=list(map(int,input().split()))
h=UnionFind(n)
d=[0]*(2*n-2)
for i in range(n-1):
    d[i]=[i,i+1,min(b,a*(x[i+1]-x[i]))]
    d[i+n-1]=[i,n-1,b]
d.sort(key=lambda x:x[2])
cnt = 0
for i in d:
    if not h.isSameGroup(i[0],i[1]):
        h.Unite(i[0],i[1])
        cnt += i[2]
print(cnt)

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]
    ans += B if A*d>B else A*d
print(ans)

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

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

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

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

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

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

Solution (Python):
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
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
now_x = X[0]
for i in range(1, N):
    ans += min((X[i] - now_x) * A, B)
    now_x = X[i]
print(ans)

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

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

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

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

Solution (Python):
def main():
    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)
    
if __name__ == "__main__":
    main()

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



print(sum(min((after - prev) * a, b) for prev, after in zip(x, x[1:])))

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n, a, b = map(int, input().strip().split())
    x = list(map(int, input().strip().split()))
    ans = 0
    for i in range(1, n):
        ans += min((x[i] - x[i-1]) * a, b)
    print(ans)
if __name__ == '__main__':
    main()

Solution (Python):
from math import ceil

n, a, b = map(int, input().split())
x_array = [int(x) for x in input().split()]

now = x_array[0]
ans = 0
for x in x_array[1:]:
    if abs(x-now)*a > b:
        ans += b
    else:
        ans += abs(now-x)*a
    now = x
print(ans)

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

Solution (Python):
n,a,b = map(int,input().split())
xn = [int(i) for i in input().split()]
dpn = [10**9+7]*n
dpn[0] = 0

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

Solution (Python):
n,a,b=map(int,input().split())
lists=list(map(int,input().split()))
lists_dis=[]
answer=0
distance=0
for i in range(n-1):
    distance=lists[i+1]-lists[i]
    lists_dis.append(distance)
for some in lists_dis:
    if some*a>b:
        answer+=b
    else:
        answer+=a*some
print(answer)

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

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


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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

Solution (Python):
import sys
import math

def input():
    return sys.stdin.readline()[:-1]

def main():
    N, A, B = map(int,input().split())
    X = sorted(list(map(int,input().split())))
    Y = [0 for k in range(N)]
    for k in range(1,N):
        Y[k-1] = X[k] - X[k-1]
    Y = sorted(Y)
    ans = 0
    for e in Y:
        ans += min(e*A,B)
    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(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 a,b in zip(X,X[1:]):
    ans += min((b-a)*A, B)
print(ans)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n, a, b = list(map(int, input().rstrip('\n').split()))
    x = list(map(int, input().rstrip('\n').split()))
    lp = x[0]
    t = 0
    for i in range(1, n):
        if (x[i] - lp) * a <= b:
            t += ((x[i] - lp) * a)
        else:
            t += b
        lp = x[i]
    print(t)


if __name__ == '__main__':
    slove()

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


ans=0
for i in range(1,n):
    aa=(x[i]-x[i-1])*a
    ans+=min(aa,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):
  if(i != 0):
    dif = X[i]-X[i-1]
    ans += min(dif*A,B)
print(ans)

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

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

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

Solution (Python):
import sys
import os
N,A,B = map(int,input().split())
X = list(map(int,input().split()))
tired = 0
cur = X[0]
for x in X:
    if A*(x - cur) <= B:
        tired += A*(x - cur)
    else:
        tired += B
    cur = x
print(tired)

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):
n, a, b = map(int, input().split())
x = list(map(int, input().split()))
vx = [0] * (n-1)
for i in range(n-1):
    vx[i] = x[i+1] - x[i] 

vx.sort()
ans = 0

for i in range(n-1):
    wf = vx[i] * a
    if wf > b:
        ans += b * (n - i - 1)
        break
    ans += wf

print(ans)

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

ans = 0
for i in range(N-1):
    ans += min(A*(X[i+1]-X[i]), 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):
    tmp = A *(X[i+1]-X[i])
    ans += min(tmp,B)

print(ans)

Solution (Python):


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

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

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

print(count)

Solution (Python):
N,A,B = [int(x) for x in input().split()]
X = [int(x) for x in input().split()]
cost = 0
for ind,x in enumerate(X[:-1]):
    cost += min((X[ind+1]-x)*A,B)
print(cost)