For this Question: Given a string S, and an integer K your task is to find the lexicographically largest string by removing no more than K characters.The first line of input contains a single string S, and the next line of input contains a single integer K.

<b>Constraints:-</b>
1 <= |S| <= 10<sup>5</sup>
1 <= K <= 10<sup>5</sup>

Note:- String will contain only lowercase English letters.Print the lexicographically largest string possible after removing not more than K characters.Sample Input 1:-
abzccd
4

Sample Output 1:-
zd

Sample Input 2:-
dcba
5

Sample Output 2:-
dcba, I have written this Solution Code: #include <bits/stdc++.h>


using namespace std;

#define MEM(a, b) memset(a, (b), sizeof(a))

#define FOREACH(it, l) for (auto it = l.begin(); it != l.end(); it++)

#define IN(A, B, C) assert( B <= A && A <= C)

#define MP make_pair
#define FOR(i,a) for(int i=0;i<a;i++)

#define FOR1(i,j,a) for(int i=j;i<a;i++)

#define EB emplace_back

#define INF (int)1e9

#define EPS 1e-9

#define PI 3.1415926535897932384626433832795
#define max1 1001
#define MOD 1000000007

#define read(type) readInt<type>()

#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
#define int long long
#define sz(v) ((int)(v).size())
#define all(v) (v).begin(), (v).end()
void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}


signed main(){
 //    freopen("ou.txt", "r", stdin);

  //   freopen("output.txt", "w", stdout);
    string s;
    cin>>s;
    int k;
    cin>>k;
    int n = s.length();
    queue<int> q[26];
    for(int i=0;i<n;i++){
        q[s[i]-'a'].push(i);
    }
    int i=0;
    string ans="";
    while(i<n){
//            out1(i);out(ans);
        for(int j=26;j>=0;j--){
            while(q[j].size()!=0 && q[j].front()<i){
                q[j].pop();
            }
            if(q[j].size() !=0 && q[j].front()-i<=k){
            ans+=(char)((int)'a'+j);
            k-=q[j].front()-i;
            i=q[j].front()+1;
            q[j].pop();
    break;

            }
        }
    }
    out(ans);
}
, In this Programming Language: C++, Now tell me if this Code is compilable or not?