For this Question: Given an array A of N integers. You can perform only one type of operation. Take two integers at positions i and j such that abs(i - j) > M and exchange them. You need to find the lexicographically minimum array formed using this operation any number of times.The first line of input contains two integers N and M as mentioned in the problem statement. The next line contains N space-separated integers denoting the elements of array A

<b>Constraints/b>
1 <= M <= N <= 10<sup>5</sup>
1 <= A[i] <= 10<sup>9</sup>Print a single line containing N integers denoting the lexicographically minimum array formed after applying the given operation any number of times.Sample Input 1:
4 1
1 2 4 3

Sample Output 1:
1 2 3 4

</b>Explanation:<b>
Since, M = 1 you cannot any two consecutive elements, other than that you can exchange any other pair
Step 1: Exchange elements at positions 1 and 3. New array - 4 2 1 3
Step 2: Exchange elements at positions 1 and 4. New array - 3 2 1 4
Step 3: Exchange elements at positions 1 and 3. New array - 1 2 3 4
This is the lexicographically minimum array formed., I have written this Solution Code: #include "bits/stdc++.h"
using namespace std;
 
#define int long long int
#define ld long double
#define pi pair<int, int>
#define pb push_back
#define fi first
#define se second
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#ifndef LOCAL
#define endl '\n'
#endif

const int N = 1e5 + 5;
const int mod = 1e9 + 7;
const int inf = 1e9 + 9;

int a[N];
vector<int> v;

void solve(){
	int n, m;
    cin >> n >> m;
    for(int i = 0; i < n; i++)
        cin >> a[i];
    if(m < n/2){
        sort(a, a + n);
        for(int i = 0; i < n; i++)
            cout<< a[i] << " ";
        return;
    }

    for(int i = 0; i < n; i++){
        if(i >= n-m-1 && i <= m)  continue;
        v.push_back(a[i]);
    }
    sort(v.begin(), v.end());
    int j = 0;
    for(int i = 0; i < n; i++){
        if(i >= n-m-1 && i <= m)
            cout<< a[i] <<" ";
        else
            cout<< v[j++] <<" ";
    }
}

void testcases(){
	int tt = 1; 
	//cin >> tt;
	while(tt--){
		solve();
	}
}

signed main() {
	IOS;
		clock_t start = clock();

	testcases();

	cerr << (double)(clock() - start)*1000/CLOCKS_PER_SEC << " ms" << endl;
	return 0;
}	, In this Programming Language: C++, Now tell me if this Code is compilable or not?