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: n,q=map(int,input().split())
a=list(map(int,input().split()))
b=[0]*(100001)
for i in range(n):
	b[a[i]]+=1
s=0
for i in range(100001):
	s+=b[i]
	b[i]=s
for i in range(q):
	v=[int(k) for k in input().split()]
	print(b[v[1]]-b[v[0]-1]), In this Programming Language: Python, Now tell me if this Code is compilable or not?