For this Question: You are given an array Arr of N integers. You have to process Q queries on the array. Each query contains L and R, for each query you have to report the number of indices i in the array such that L <= Arr[i] <= R.First line of input contains two integers N and Q representing number of elements in the array and number of queries.
Second line of input contains N integers representing the array Arr.
Next Q lines of input contains L and R for that query.

Constraints 
1 <= N,Q <= 100000
1 <= Arr[i] <= 100000
1 <= L <= R <= 100000For each query you have to print the number of index i in the array such that L <= Arr[i] <= R in a seperate line.Sample input 
10 10
3 6 7 4 9 1 7 10 9 4 
1 9
4 6
4 7
4 6
6 8
5 8
2 6
2 3
9 9
2 5

Sample output
9
3
5
3
3
3
4
1
2
3

Explanation : 
For range 1 to 9 : all indexes except index 8 (with value 10) have values in the range 1 to 9
For range 4 to 6 : indexes 2(with value 6), 4(with value 4) and 10(with value 4) have value in the range 4 to 6, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
#define ll long long
#define VV vector
#define pb push_back
#define bitc  __builtin_popcountll
#define m_p make_pair
#define infi 1e18+1
#define eps 0.000000000001
#define fastio ios_base::sync_with_stdio(false);cin.tie(NULL);
string char_to_str(char c){string tem(1,c);return tem;}
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template<class T>//usage rand<long long>()
T rand() {
    return uniform_int_distribution<T>()(rng);
}
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
 
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> oset;
// string to integer stoi()
// string to long long stoll()
// string.substr(position,length);
// integer to string to_string();
 
//////////////
auto clk=clock();
#define all(x) x.begin(),x.end()
#define S second
#define F first
#define sz(x) ((long long)x.size())
#define int long long  
#define f80 __float128
#define pii pair<int,int>
/////////////
signed main()
{
	fastio;
	#ifdef ANIKET_GOYAL
		freopen("inputf.in","r",stdin);
		freopen("outputf.in","w",stdout);
	#endif
	int n,q;
	cin>>n>>q;
	int c[100001]={};
	int a[n+1];
	for(int i=1;i<=n;++i)
	{
		cin>>a[i];
		c[a[i]]++;
	}
	vector<int> ans;
	for(int i=1;i<=100000;++i)
		c[i]=c[i]+c[i-1];
	for(int i=1;i<=q;++i)
	{
		int l,r;
		cin>>l>>r;
		ans.push_back(c[r]-c[l-1]);
	}
	for(auto r:ans)
		cout<<r<<"\n";
	#ifdef ANIKET_GOYAL
		// cout<<endl<<endl<<endl<<endl<<"Time elapsed: "<<(double)(clock()-clk)/CLOCKS_PER_SEC<<endl;
	#endif
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?