One day, he raises q questions. The i-th question is described by two integers. , asking the h-index of Bobo if has *only* published papers with citations
The h-index of an author is the largest h where he has at least h papers with citations not less than h. Bobo has published n papers with citations a_1, a_2, dots, a_n a 1 ,a 2 ,…,a n respectively. One day, he raises q questions. The i-th question is described by two integers l_i l i and r_i r i , asking the h-index of Bobo if has *only* published papers with citations a_{l_i}, a_{l_i + 1}, dots, a_{r_i} a l i ,a l i +1 ,…,a r i .
(图片来源网络,侵删)