Here a simple problem.Give you n numbers.a1,a2...an.Then ask you m times.each time you should answer the the minimum number between ax to ay.
输入
There are several test First line input two number n,m(1<=n<=100000,1<=m<=100000) then next line follow n integer. next m line with two numbers x,y;(1<=x<=y<=n)
输出
for each x,y you should output the minimum number between ax to ay.