For this Question: Given a string S consisting of uppercase and lowercase characters. The task is to sort uppercase and lowercase characters separately such that if the ith place in the original string had an uppercase character then it should not have a lowercase character after being sorted and vice versa.The first line contains a single integer N denoting the length of the string. The second line contains a string S of length N, consisting of uppercase and lowercase characters.

1 <= N <= 100000Print a single integer containing the sorted string.Sample Input:
Valak

Sample Output:
Vaakl

Sample Input:
mwYifAbSQV

Sample Output:
bfAimQwSVY, 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];

void solve(){
	string s;	cin >> s;
	vector<char> v, u;
	for(int i = 0; i < (int)s.length(); i++){
		if(s[i] >= 'A' && s[i] <= 'Z')
			a[i] = 1, v.push_back(s[i]);
		else
			u.push_back(s[i]);
	}
	sort(v.begin(), v.end());
	sort(u.begin(), u.end());
	int p = 0, q = 0;
	for(int i = 0; i < (int)s.length(); i++){
		if(a[i])
			cout << v[p++];
		else
			cout << u[q++];
	}
}

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?