题目
Mr. Frog has an integer sequence of length n, which can be denoted as a1,a2,⋯,an.There are m queries. In the i-th query, you are given two integers lili and riri. Consider the subsequence ali,ali1,ali2,⋯,ari. We can denote the positions(the positio…