For this Question: During this period of social distancing, Tono can't help herself remember the N beautiful numbers that exist. The numbers, without a doubt, are 1 to N. Beautiful numbers are extremely expensive, the cost of buying the i-th beautiful number is cost[i]. 
But there is one thing that only Tono can do, she can increment the values of all the numbers she possess at any point of time by 1, except for N that turns to 1. For example if she currently possess 2, 4, 7 (N=7) she can change them to 3, 5, 1. The cost of this magic is X.
There are infinite numbers of each kind. Help Tono find the minimum cost for possessing all the numbers.

Note: She can buy any number at any point of time, and use the magic at any point of time as well. The magic can be used any number of times, but the cost incurred every time is X.The first line of the input contains two numbers N and X.
The next line contains N integers, the cost of the N beautiful numbers, cost[1], cost[2],...,cost[N].


Constraints
1 <= N <= 2000
1 <= X <= 1000000000 (10^9)
1 <= cost[i] <= 1000000000 (10^9)The only line of the output should contain the minimum cost for possessing all the beautiful numbers.Sample Input
2 10
2 15

Sample Output
14

Explanation: First Tono buys number 1, then use the magic, then buy the number 1. (2+10+2=14), I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define sd(x) scanf("%d", &x)
#define sz(v) (int) v.size()
#define pr(v) For(i, 0, sz(v)) {cout<<v[i]<<" ";} cout<<endl;
#define slld(x) scanf("%lld", &x)
#define all(x) x.begin(), x.end()
#define For(i, st, en) for(ll i=st; i<en; i++)
#define tr(x) for(auto it=x.begin(); it!=x.end(); it++)
#define fast std::ios::sync_with_stdio(false);cin.tie(NULL);
#define pb push_back
#define ll long long
#define int long long
#define mp make_pair
#define F first
#define S second
typedef pair<int, int> pii;
typedef vector<int> vi;
#define MOD 1000000007
#define INF 1000000000000000007LL

const int N = 100005;
 
// it's swapnil07 ;)
 
#ifdef SWAPNIL07
#define trace(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){
    cout << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
    const char* comma = strchr(names + 1, ',');cout.write(names, comma - names) << " : " << arg1<<" | ";__f(comma+1, args...);
}
int begtime = clock();
#define end_routine() cout << "\n\nTime elapsed: " << (clock() - begtime)*1000/CLOCKS_PER_SEC << " ms\n\n";
#else
#define endl '\n'
#define trace(...)
#define end_routine()
#endif

int dp[2005][2005];

signed main()
{
    fast
   
    int n, x; cin>>n>>x;
    int a[n];
    int ans = INF;
    for(int i=0; i<n; i++){
        cin>>a[i];
        dp[i][0]=a[i];
    }
    for(int i=0; i<n; i++){
        for(int j=1; j<n; j++){
            dp[i][j]=min(dp[i][j-1], a[(i+j)%n]);
        }
    }
    for(int i=0; i<n; i++){
        int val = 0;
        for(int j=0; j<n; j++){
            val += dp[j][i];
        }
        val += x*i;
        ans = min(ans, val);
    }
    cout<<ans;
    return 0;
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?