algorithms – How to find all sub-arrays whose bits and bits are located in a given range?

Given a table A whole numbers, we have to find sub-tables, bits And whose elements are in a given range, from the lowest to the highest

low <min (A[0],A[1]....A[n-1])

and

high = min (A[0],A[1]..A[n-1])

that is to say, find everything {i, j} such as low <= A[i]&A[i+1]&...&A[j] <= up

I've been thinking about it for a long time, but I can not find anything if it's naive implementation of the generation of all sub-tables.

Can there be a better solution asymptotically for this?