For this Question: Given two arrays A and B. Given Q queries each having a positive integer i denoting an index of the array A. For each query, your task is to find number of elements less than or equal to A(i) in the array B.The first line of the input consists of an integer N. 
The second and third line of each test case consists of N space separated integers representing array A and array B respectively. 
The fourth line contains a positive integer Q, denoting the number of queries. 
Next Q lines contain an integer corresponding to a query.

1 <= N <= 10^5
1 <= A(i), B(i) <= 10^7
1 <= Q <= 10^3For each test case, print the required answer in a new line.Sample Input:
6
1 2 3 4 7 9
0 1 2 1 1 4
2
5
4 

Sample Output:
6
6

Explanation:
For 1st query, the given index is 5, A[5] is 9 and in B all the elements are smaller than 9.
For 2nd query, the given index is 4, A[4] is 7 and in B all the elements are smaller than 7., I have written this Solution Code: 
// author-Shivam gupta

#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 MOD 1000000007

#define read(type) readInt<type>()
#define max1 10000001
#define out(x) cout<<x<<'\n'
#define out1(x) cout<<x<<" "
#define END cout<<'\n'
typedef long int li;

typedef unsigned long int uli;

typedef long long int ll;

typedef unsigned long long int  ull;


void fast(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
}
int a[max1];
int main(){

    fast();
    FOR(i,max1){
    a[i]=0;}
    int n;
    cin>>n;
    li x;
    map<li,li> m;

    for(int i=0;i<n;i++){
    cin>>x;
    m[i]=x;
    }
    for(int i=0;i<n;i++){
        cin>>x;
        a[x]++;
    }
    FOR1(i,1,max1){
    a[i]+=a[i-1];
    }
    int t;
    cin>>t;
    while(t--){
        cin>>x;
        out(a[m[x]]);
    }

}

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