For this Question: There are N cities on X-axis and you want to visit all of them. For traveling you can walk or teleport. 
For 1 unit walk the cost is A unit. The price is B units for teleportation from any point to any other. 
Find the minimum possible total cost when you visit all the cities. Initially, you are at city 1.The first line of input contains three space-separate integers N, A, B
The second input line includes N distinct space-separated integers X1, X2,.....Xn which are the coordinates of the city on the X-axis.

<b>Constraints:-</b>
1 <= N <= 10<sup>5</sup>
1 <= A,B <= 10^9
1 <= Xi <= 10^9
Xi < X(i+1)Print the minimum possible total cost when you visit all the cities.Sample Input :
4 2 5
1 2 5 7

Sample Output :
11

<b>Explanation:</b>
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., I have written this Solution Code: import java.util.*;
public class Main
{
    public static void main (String [] args)
    {
        Scanner scan = new Scanner (System.in);
        int n = scan.nextInt();
        int a = scan.nextInt();
        int b = scan.nextInt();
        int [] cities = new int [n];
        // int resArr [] = new int [n];
        for (int i=0; i<n; i++)
        {
            cities[i] = scan.nextInt(); 
        }
        //Arrays.sort(cities);
        long sum =0;
        // if(cities[0] != 1)
        // {
        //     int diffInCities = cities[0]-1; 
        //    int walkCost = a * diffInCities;
        //    int teleportCost = b;
        //    sum = sum + (walkCost>teleportCost?teleportCost:walkCost);
        // }
        for(int i=1; i<n; i++)
        {
           int diffInCities = cities[i]-cities[i-1]; 
           int walkCost = a * diffInCities;
           int teleportCost = b;
           sum = sum + (walkCost>teleportCost?teleportCost:walkCost);
        }
        System.out.println(sum);
    }
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?