Can any any data structure solve this problem ?

Правка en1, от I_love_Saundarya, 2019-08-28 07:59:02

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 ?

Теги #advance data structures, #segment tree

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский I_love_Saundarya 2019-08-28 07:59:02 417 Initial revision (published)