The problem is as follows(created by me) : -
Given an array of 'n' integers , where n=10^6 , all integers are non-negative.
There are 10^5 queries of the the type :- Q(L,R,X) , which means the first index of a number whose value is less than or equal to x .
Example :- {2,3,4,5,2,1} and Q(2,6,2) = 5 , as a[5]=2 which is <=2 .
Is there any way to solve it ?