#C623. Maximum Distance Difference
Maximum Distance Difference
Maximum Distance Difference
You are provided with the daily running distances for two runners, Jessie and James, over n days. Your task is to compute the maximum absolute difference between their running distances on any day.
In mathematical terms, given two sequences \(a_1, a_2, \dots, a_n\) and \(b_1, b_2, \dots, b_n\), you need to find:
\(\max_{1 \le i \le n} \lvert a_i - b_i \rvert\)
The input will be provided via standard input and the output should be printed to standard output.
inputFormat
The first line contains an integer n
representing the number of days.
The second line contains n
space-separated integers representing the distances run by Jessie on each day.
The third line contains n
space-separated integers representing the distances run by James on each day.
outputFormat
Output a single integer denoting the maximum absolute difference between Jessie and James's daily running distances.
## sample5
10 15 7 8 10
12 10 5 6 8
5