#include<bits/stdc++.h>
using namespace std;
using ll = long long int;
using vi = vector<int>;
using vll = vector<long long int>;
using vii = vector<vi>;
using pii = pair<int, int>;
#define REP(i,n) for(int (i)=0;(i)<(n);(i)++)
#define FOR(i, a, b) for(int (i) = a; (i) < (b);(i)++)
#define MAX(a, b) ((a > b) ? a : b)
#define MIN(a, b) ((a > b) ? b : a)
int gcd(int a,int b){return b?gcd(b,a%b):a;}
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
const int QUA = 1e9 + 7;
int main(){
ll n, a, b;
scanf("%lld%lld%lld", &n, &a, &b);
ll P, Q, ans = 0;
scanf("%lld", &P);
REP(i, n - 1){
scanf("%d", &Q);
ans += MIN(a * (Q - P), b);
P = Q;
}
printf("%lld\n", ans);
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:27:19: warning: format ‘%d’ expects argument of type ‘int*’, but argument 2 has type ‘ll* {aka long long int*}’ [-Wformat=]
scanf("%d", &Q);
^
./Main.cpp:23:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld%lld", &n, &a, &b);
^
./Main.cpp:25:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &P);
^
./Main.cpp:27:20: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &Q);
^