#K981. Maximum Distance in a Day
Maximum Distance in a Day
Maximum Distance in a Day
You are given several test cases. In each test case, you have the number of days and the distances run on each day. Your task is to determine the maximum distance run on any single day for each test case. The answer for each test case should be printed on a new line.
For each list of daily distances (a_1, a_2, \dots, a_n), you need to compute (\max_{1 \leq i \leq n} a_i).
Input is read from standard input (stdin) and output is written to standard output (stdout).
inputFormat
The first line of input contains an integer (T), representing the number of test cases. Each test case consists of two lines:
- The first line contains an integer (N) indicating the number of days.
- The second line contains (N) space-separated integers representing the distances run on each day.
outputFormat
For each test case, print the maximum distance encountered in that test case on a new line.## sample
2
3
5 0 10
4
0 0 0 0
10
0
</p>