#P2471. [SCOI2007] 降雨量
[SCOI2007] 降雨量
Description
We often say statements like: "Year has the highest rainfall since year ." It means that the rainfall in year does not exceed that in year , and for any year with , the rainfall in year is strictly less than that in year . For example, if the rainfalls in years 2002, 2003, 2004, and 2005 are 4920, 5901, 2832, and 3890 respectively, then we can say "2005 is the highest since 2003," but we cannot say "2005 is the highest since 2002." Since the rainfalls of some years are unknown, some statements may be true or may be false.
Input Format
The first line contains a positive integer , the number of known records.
Each of the following lines contains two integers and , the year and its rainfall, sorted in strictly increasing order of year, i.e., .
The next line contains a positive integer , the number of queries.
Each of the following lines contains two integers and , asking whether the statement "Year has the highest rainfall since year ." is "true", "false", or "maybe".
Output Format
For each query, output true, false, or maybe.
6
2002 4920
2003 5901
2004 2832
2005 3890
2007 5609
2008 3024
5
2002 2005
2003 2005
2002 2007
2003 2007
2005 2008
false
true
false
maybe
false
Hint
Constraints: For 100% of the testdata, , , , , .
It is guaranteed that .
Translated by ChatGPT 5
京公网安备 11011102002149号