#P3579. [POI 2014] PAN-Solar Panels
[POI 2014] PAN-Solar Panels
Description
For queries, each query is given four integers . Choose any two integers and from the intervals and , respectively, and find the maximum possible value of .
Input Format
The first line contains an integer representing the number of queries.
The next lines each contain a query: four integers specifying the two intervals.
Output Format
Output lines, each containing a single integer: the maximum possible value of when choosing from and from .
4
3 9 8 8
1 10 11 15
4 7 22 23
2 5 19 24
8
7
2
5
Hint
Constraints
For of the testdata, , , .
Notes
Translated by @一只书虫仔。
Translated by ChatGPT 5
京公网安备 11011102002149号