stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

  long long int n,a,b,i,tem,v,sum=0;

  cin>>n>>a>>b;

  for(i=1;i<=n;i++)

  {

    if(i>1)tem=v;

    cin>>v;

    if(i>1)

    {

      if(abs(v-tem)*a>b)

      sum+=b;

    else sum+=abs(v-tem)*a;

    tem=v;

    }

  }

  cout<<sum<<endl;

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2170041099926205x):
#include<cstdio>

#include<algorithm>

using namespace std;



int arr[100005];

int main(){

    int N, A, B;

    scanf("%d%d%d",&N,&A,&B);

    long long ans = 0;

    for(int i=0;i<N;i++){

        scanf("%d",&arr[i]);

    }

    sort(arr,arr+N);

    for(int i=1;i<N;i++){

        ans += min(1ll*abs(arr[i]-arr[i-1])*A,1ll*B);

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

using namespace std;

long long n,a,b;

long long x[100010];

void read(long long &x)

{

	char ch;

	ch=getchar();

	while(ch<'0'||ch>'9') ch=getchar();

	while(ch>='0'&&ch<='9') {x=x*10+ch-'0';ch=getchar();}

}

int main()

{

	read(n);read(a);read(b);

	long long ans=0;

	read(x[1]);

	for(int i=2;i<=n;i++)

	{

		read(x[i]);

		if((x[i]-x[i-1])*a>b) ans+=b;

		else ans+=(x[i]-x[i-1])*a;

	}

	printf("%lld",ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.1364042085857715x):
#include<cstdio>

#include<algorithm>

using namespace std;



int arr[100005];

int main(){

    int N, A, B;

    scanf("%d%d%d",&N,&A,&B);

    long long ans = 0;

    for(int i=0;i<N;i++){

        scanf("%d",&arr[i]);

    }

    sort(arr,arr+N);

    for(int i=1;i<N;i++){

        ans += min(1ll*abs(arr[i]-arr[i-1])*A,1ll*B);

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <cstring>

#include <string>

#include <cmath>

#define ll long long

using namespace std;

ll a[100005];

int main(){

	ll n,A,B;

	cin>>n>>A>>B;

	for(ll i=0;i<n;i++){

		cin>>a[i];

	}

	ll sum=0;

	for(ll i=1;i<n;i++){

		ll ans1=(a[i]-a[i-1])*A;

		ll ans2=B;

		if(ans1<ans2)

			sum+=ans1;

		else

			sum+=ans2;

	}

	cout<<sum<<endl;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.216429469434664x):
#include<cstdio>

#include<algorithm>

using namespace std;



int arr[100005];

int main(){

    int N, A, B;

    scanf("%d%d%d",&N,&A,&B);

    long long ans = 0;

    for(int i=0;i<N;i++){

        scanf("%d",&arr[i]);

    }

    sort(arr,arr+N);

    for(int i=1;i<N;i++){

        ans += min(1ll*abs(arr[i]-arr[i-1])*A,1ll*B);

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<math.h>

using namespace std;

long long a[100005];

int main()

{

	long long n,a1,b,minsum=0;

	cin>>n>>a1>>b;

	for(int i=1;i<=n;i++)

	cin>>a[i];

	sort(a+1,a+n+1);

	for(int i=1;i<n;i++)

	minsum+=min(a1*(a[i+1]-a[i]),b);

	cout<<minsum<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.238584254264983x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream> 

using namespace std;

int main()

{

	long long n,a,b,x,y,tir=0;;

	cin>>n>>a>>b>>x;

	n--;

	while(n--){

		cin>>y;

		if((y-x)*a>b)tir+=b;

		else tir+=(y-x)*a;

		x=y;

	}cout<<tir;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2274100883743x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cmath>

#include <cstring>

#include <algorithm>

#include <vector>

#include <map>

#include <cstdlib>

#include <set>

#include <queue>

using namespace std;



#define X first

#define Y second

#define N 100010

typedef long long ll;

typedef pair<int,int> pii;

const int Mod=1000000007;



const double INF=1e18;

typedef long long ll;

int x[N];





int main()

{

	//freopen("in.in","r",stdin);

	//freopen("out.out","w",stdout);

	

	int n,a,b; scanf("%d%d%d",&n,&a,&b);

	for (int i=1;i<=n;i++) scanf("%d",&x[i]);

	

	ll ans=0;

	for (int i=2;i<=n;i++)

	{

		ans+=min(1ll*(x[i]-x[i-1])*a,1ll*b);

	}

	cout<<ans<<endl;

	

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2340396249509515x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



typedef long long LL;

int N,A,B,X[100010];



int main()

{

	scanf("%d%d%d",&N,&A,&B);

	for (int i=1;i<=N;i++)scanf("%d",&X[i]);

	LL ans=0;

	for (int i=2;i<=N;i++)

	ans+=min(LL(A)*LL(X[i]-X[i-1]),LL(B));

	cout<<ans<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.233615030073031x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include<set>

#include<map>

#include<stack>

#include<queue>

#include<deque>

#include<cmath>

#include<cstdio>

#include<cctype>

#include<string>

#include<vector>

#include<cstdlib>

#include<cstring>

#include<sstream>

#include<iostream>

#include<algorithm>

#define MAXN 100000

#define hlq 1000000007

#define pii pair<int,int>



using namespace std;

int d[MAXN+80];

long long ans,a,b;

int main()

{

	int n,i;

	scanf("%d",&n);

	cin>>a>>b;

	for(i=1;i<=n;i++)

		scanf("%d",d+i);

	for(i=1;i<n;i++)

		ans+=min(a*(d[i+1]-d[i]),b);

	cout<<ans;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2564245597390356x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



typedef long long LL;



const int N = 1e5 + 10;

int x[N];



int main() {

    int n, a, b;

    scanf("%d%d%d", &n, &a, &b);

    for (int i = 0; i < n; i++) scanf("%d", x + i);

    LL ans = 0;

    for (int i = 1; i < n; i++) {

        ans += min(1ll * (x[i] - x[i-1]) * a, (LL)b);

    }

    printf("%lld\n", ans);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.216170037071525x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

#define LL long long



const LL MOD = 1e9 + 7;

const int N = 200005;



LL n, A, B, in[N];



int main()

{

    while(cin >> n >> A >> B){

        for(int i=0;i<n;i++) cin >> in[i];

        sort(in, in + n);

        LL mn = 0;

        for(int i=1;i<n;i++){

            LL dis = in[i] - in[i - 1];

            LL x = dis * A;

            if(x < B) mn += x;

            else mn += B;

        }

        cout << mn << '\n';

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.240855104801729x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
// In the name of Allah the Most Merciful.



#include<bits/stdc++.h>

using namespace std;



typedef long long ll;



int main(void)

{

    ll n , a , b;

    cin >> n >> a >> b;



    ll ar[n];



    for(int i=0;i<n;i++)cin >> ar[i];



    ll ans = 0;



    for(int i=0;i<n-1;i++){



        ll temp = ar[i+1] - ar[i];

        ans+=min(temp*a , b);

    }



    cout << ans << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.237270938383962x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



#define debug(x) cout << #x << " = " << x << endl

#define fori(i, ini, lim) for(int i = int(ini); i < int(lim); i++)

#define ford(i, ini, lim) for(int i = int(ini); i >= int(lim); i--)



using namespace std;



typedef long long ll;

typedef long double ld;

typedef pair<int, int> ii;



const int MAX = 1e5 + 5;

ll arr[MAX];

ll n, a, b;



int main() {

	scanf("%lld %lld %lld", &n, &a, &b);

	fori(i, 1, n + 1) {

		scanf("%lld", arr + i);

	}



	ll ans = 0;

	fori(i, 2, n + 1) {

		ans += min((arr[i] - arr[i - 1]) * a, b);

	}



	printf("%lld\n", ans);



	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.215465795222283x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

  long long int n,a,b,i,tem,v,sum=0;

  cin>>n>>a>>b;

  for(i=1;i<=n;i++)

  {

    if(i>1)tem=v;

    cin>>v;

    if(i>1)

    {

      if(abs(v-tem)*a>b)

      sum+=b;

    else sum+=abs(v-tem)*a;

    tem=v;

    }

  }

  cout<<sum<<endl;

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.23718455528811x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<cstdio>

using namespace std;

long long n,a,b;

long long x[100010];

void read(long long &x)

{

	char ch;

	ch=getchar();

	while(ch<'0'||ch>'9') ch=getchar();

	while(ch>='0'&&ch<='9') {x=x*10+ch-'0';ch=getchar();}

}

int main()

{

	read(n);read(a);read(b);

	long long ans=0;

	read(x[1]);

	for(int i=2;i<=n;i++)

	{

		read(x[i]);

		if((x[i]-x[i-1])*a>b) ans+=b;

		else ans+=(x[i]-x[i-1])*a;

	}

	printf("%lld",ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.156272876879198x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <cstring>

#include <string>

#include <cmath>

#define ll long long

using namespace std;

ll a[100005];

int main(){

	ll n,A,B;

	cin>>n>>A>>B;

	for(ll i=0;i<n;i++){

		cin>>a[i];

	}

	ll sum=0;

	for(ll i=1;i<n;i++){

		ll ans1=(a[i]-a[i-1])*A;

		ll ans2=B;

		if(ans1<ans2)

			sum+=ans1;

		else

			sum+=ans2;

	}

	cout<<sum<<endl;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.236607691902243x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

#include <cstdio>

#include <cstring>

#include <string>

#include <cmath>

using namespace std;

long long t[100005];

int main()

{

	long long n,a,b;

	cin>>n>>a>>b;

	long long x=0;

	for(int i=0;i<n;i++)

	{

		cin>>t[i];

	}

	for(int i=0;i<n-1;i++)

	{

		if((t[i+1]-t[i])*a>=b)

		{

			x+=b;

		}

		else

		{

			x=x+(t[i+1]-t[i])*a;

		}

	}

	cout<<x<<endl;

	return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 5.236673577314335x):
#include<cstdio>

long long N,A,B;

int main()

{

    scanf("%lld%lld%lld",&N,&A,&B);

    long long s;

    scanf("%lld",&s);

    long long ans=0;

    for(int i=1;i<N;i++)

    {

        long long x;

        scanf("%lld",&x);

        if((x-s)*A<B)

            ans+=(x-s)*A;

        else

            ans+=B;

        s=x;

    }

    printf("%lld\n",ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

#include<algorithm>

#include<math.h>

using namespace std;

long long a[100005];

int main()

{

	long long n,a1,b,minsum=0;

	cin>>n>>a1>>b;

	for(int i=1;i<=n;i++)

	cin>>a[i];

	sort(a+1,a+n+1);

	for(int i=1;i<n;i++)

	minsum+=min(a1*(a[i+1]-a[i]),b);

	cout<<minsum<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.218200539033241x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include<iostream> 

using namespace std;

int main()

{

	long long n,a,b,x,y,tir=0;;

	cin>>n>>a>>b>>x;

	n--;

	while(n--){

		cin>>y;

		if((y-x)*a>b)tir+=b;

		else tir+=(y-x)*a;

		x=y;

	}cout<<tir;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.207069852640913x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <cstdio>

#include <cmath>

#include <cstring>

#include <algorithm>

#include <vector>

#include <map>

#include <cstdlib>

#include <set>

#include <queue>

using namespace std;



#define X first

#define Y second

#define N 100010

typedef long long ll;

typedef pair<int,int> pii;

const int Mod=1000000007;



const double INF=1e18;

typedef long long ll;

int x[N];





int main()

{

	//freopen("in.in","r",stdin);

	//freopen("out.out","w",stdout);

	

	int n,a,b; scanf("%d%d%d",&n,&a,&b);

	for (int i=1;i<=n;i++) scanf("%d",&x[i]);

	

	ll ans=0;

	for (int i=2;i<=n;i++)

	{

		ans+=min(1ll*(x[i]-x[i-1])*a,1ll*b);

	}

	cout<<ans<<endl;

	

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2136735932049145x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



typedef long long LL;

int N,A,B,X[100010];



int main()

{

	scanf("%d%d%d",&N,&A,&B);

	for (int i=1;i<=N;i++)scanf("%d",&X[i]);

	LL ans=0;

	for (int i=2;i<=N;i++)

	ans+=min(LL(A)*LL(X[i]-X[i-1]),LL(B));

	cout<<ans<<endl;

}

// Faster C++ solution for the same problem (measured speedup: 5.213250650456779x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include<set>

#include<map>

#include<stack>

#include<queue>

#include<deque>

#include<cmath>

#include<cstdio>

#include<cctype>

#include<string>

#include<vector>

#include<cstdlib>

#include<cstring>

#include<sstream>

#include<iostream>

#include<algorithm>

#define MAXN 100000

#define hlq 1000000007

#define pii pair<int,int>



using namespace std;

int d[MAXN+80];

long long ans,a,b;

int main()

{

	int n,i;

	scanf("%d",&n);

	cin>>a>>b;

	for(i=1;i<=n;i++)

		scanf("%d",d+i);

	for(i=1;i<n;i++)

		ans+=min(a*(d[i+1]-d[i]),b);

	cout<<ans;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 5.2359714265713055x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



using namespace std;



typedef long long LL;



const int N = 1e5 + 10;

int x[N];



int main() {

    int n, a, b;

    scanf("%d%d%d", &n, &a, &b);

    for (int i = 0; i < n; i++) scanf("%d", x + i);

    LL ans = 0;

    for (int i = 1; i < n; i++) {

        ans += min(1ll * (x[i] - x[i-1]) * a, (LL)b);

    }

    printf("%lld\n", ans);

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.195873537201461x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include <iostream>

#include <algorithm>

using namespace std;

#define LL long long



const LL MOD = 1e9 + 7;

const int N = 200005;



LL n, A, B, in[N];



int main()

{

    while(cin >> n >> A >> B){

        for(int i=0;i<n;i++) cin >> in[i];

        sort(in, in + n);

        LL mn = 0;

        for(int i=1;i<n;i++){

            LL dis = in[i] - in[i - 1];

            LL x = dis * A;

            if(x < B) mn += x;

            else mn += B;

        }

        cout << mn << '\n';

    }

    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.220462553524134x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
// In the name of Allah the Most Merciful.



#include<bits/stdc++.h>

using namespace std;



typedef long long ll;



int main(void)

{

    ll n , a , b;

    cin >> n >> a >> b;



    ll ar[n];



    for(int i=0;i<n;i++)cin >> ar[i];



    ll ans = 0;



    for(int i=0;i<n-1;i++){



        ll temp = ar[i+1] - ar[i];

        ans+=min(temp*a , b);

    }



    cout << ans << endl;



    return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.2168923333605575x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>



#define debug(x) cout << #x << " = " << x << endl

#define fori(i, ini, lim) for(int i = int(ini); i < int(lim); i++)

#define ford(i, ini, lim) for(int i = int(ini); i >= int(lim); i--)



using namespace std;



typedef long long ll;

typedef long double ld;

typedef pair<int, int> ii;



const int MAX = 1e5 + 5;

ll arr[MAX];

ll n, a, b;



int main() {

	scanf("%lld %lld %lld", &n, &a, &b);

	fori(i, 1, n + 1) {

		scanf("%lld", arr + i);

	}



	ll ans = 0;

	fori(i, 2, n + 1) {

		ans += min((arr[i] - arr[i - 1]) * a, b);

	}



	printf("%lld\n", ans);



	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.195172035608863x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

int main()

{

  long long int n,a,b,i,tem,v,sum=0;

  cin>>n>>a>>b;

  for(i=1;i<=n;i++)

  {

    if(i>1)tem=v;

    cin>>v;

    if(i>1)

    {

      if(abs(v-tem)*a>b)

      sum+=b;

    else sum+=abs(v-tem)*a;

    tem=v;

    }

  }

  cout<<sum<<endl;

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 5.21680628638766x):
#include<cstdio>

#include<algorithm>

using namespace std;

typedef long long ll;

int n;

ll A, B;

ll x[100100];

int main()

{

	ll ans = 0;

	scanf("%d%lld%lld", &n, &A, &B);

	for (int i = 1; i <= n; i++)

	{

		scanf("%lld", &x[i]);

		if (i > 1)

			ans += min(B, A * (x[i] - x[i - 1]));

	}

	printf("%lld\n", ans);

	return 0;

}