We have to handle Q queries on the array and in each query we are asked to find number of pairs {a,b} present at the moment in the array whose value are such that a<=x and b<=y for {x,y} given in the query.
Problem Link :-Codechef Bulbs
Please share the approach as I am not getting any tutorial for this problem
Please help . Thanks in advance.