题目链接:HDU 5443
Problem Description
In Land waterless, water is a very limited resource. People always fight for the biggest source of water. Given a sequence of water sources with
representing the size of the water source. Given a set of queries each containing integers and , please find out the biggest water source between and .
Input
First you are given an integer
indicating the number of test cases. For each test case, there is a number on a line representing the number of water sources. integers follow, respectively , and each integer is in . On the next line, there is a number representing the number of queries. After that, there will be lines with two integers and indicating the range of which you should find out the biggest water source.
Output
For each query, output an integer representing the size of the biggest water source.
Sample Input
1 | 3 |
Sample Output
1 | 100 |
Source
2015 ACM/ICPC Asia Regional Changchun Online
Solution
题意
给定
思路
ST算法
Code
1 |
|
v1.5.2