• [1358] An Easy Problem

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • 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.
  • 样例输入
  • 8 3
    5 4 1 3 7 8 5 6
    1 8
    5 6
    5 8
    
  • 样例输出
  • 1
    7
    5
    
  • 提示
  • 来源
  • Lucifer
  • 操作

显示春菜