#K72712. Analyze Weather Data
Analyze Weather Data
Analyze Weather Data
This problem requires you to analyze weather data collected over multiple days. For each day, you are given several temperature readings, and your task is to determine the maximum and minimum temperatures. Formally, given a set of readings \(r_1, r_2, \ldots, r_n\) for a day, compute \(\max\{r_i\}\) and \(\min\{r_i\}\).
inputFormat
The input is provided via standard input (stdin) and consists of several test cases. The first line contains an integer \(T\), representing the number of test cases. For each test case, the first line contains an integer \(M\) representing the number of days. For each day, the first number is an integer \(K\) indicating the number of temperature readings for that day, followed by \(K\) integers (each on a new line) representing the readings.
outputFormat
For each day across all test cases, output a single line (to standard output, stdout) containing two space-separated integers: the maximum and minimum temperature for that day respectively.
## sample1
2
4
-10
5
0
7
3
1
-3
4
7 -10
4 -3
</p>