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: import java.io.*;import java.util.*;
class Main {	static class FastReader
    {
        BufferedReader br;
        StringTokenizer st;

        public FastReader()
        {
            br = new BufferedReader(new
                     InputStreamReader(System.in));
        }

        String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException  e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine()
        {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
		public static void main (String[] args) {

		FastReader scan = new FastReader( );
		int testcase = 1;
		for(int z=0;z<testcase;z++) {
		    int n = scan.nextInt();
		    int[] ar = new int[n];
		    int[] br = new int[n];
		    int count=0,m=0;
            int c[] = new int[n];
		    for(int i=0;i<n;i++) {
		        ar[i] = scan.nextInt();
                c[i] = ar[i];
                            }
	        for(int i=0;i<n;i++)
	            br[i] = scan.nextInt();

            Arrays.sort(ar);
			Arrays.sort(br);

			int k = 0;
            HashMap<Integer, Integer> hm = new HashMap<>();
            for(int i=0;i<n;i++){
                while( k<n && ar[i]>=br[k] ){
                    k++;
                }
                hm.put(ar[i], k);
            }

            ar = new int[n];
			int q = scan.nextInt();
			while(q-->0){
				int index = scan.nextInt();
				System.out.println(hm.get(c[index]));
			}
            System.out.println();
		}
	}

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