For this Question: Given an array of N integers, an integer X, and Q queries. For each query, you will be given an integer K. Your task is to find the Kth occurrence of the number X in the array. If the Kth occurrence does not exist print -1.The first line of input contains three integers N, X, and Q. The second line of input contains N space- separated integers. The Next Q lines of input contain a single integer each representing K.

Constraints:-
1 <= Q, K, N <= 100000
1 <= X, Arr[] <= 100000For each query in a new line print the index of the Kth occurrence. If the Kth occurrence does not exist print -1.Sample Input:-
10 3 4
1 2 3 4 2 3 4 5 2 3
1
2
3
4

Sample Output:_
3
6
10
-1, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define int long long

signed main(){

int n,x,q;
cin>>n>>x>>q;
vector<int> a(n),v;
for(int i=0;i<n;i++){
    cin>>a[i];
    if(a[i]==x){
        v.push_back(i+1);
    }
}
while(q--){
    cin>>x;
    if(x<=v.size()){
        cout<<v[x-1]<<'\n';
    }
    else{
        cout<<-1<<'\n';
    }
}

}

, In this Programming Language: C++, Now tell me if this Code is compilable or not?