#C3560. Maximum Altitude Change Comparison
Maximum Altitude Change Comparison
Maximum Altitude Change Comparison
Alex and Jamie are mountain hikers who recorded altitude values during their journey. For each hiker, calculate the maximum absolute altitude change between two consecutive data points, represented by the formula: \( |a_i - a_{i+1}| \). Compare the two values: if one is greater, output the corresponding hiker’s name along with the maximum change; if they are equal, output "Tie" along with the change value.
inputFormat
The first line contains an integer \( M \) indicating the number of altitude recordings. The second line contains \( M \) space-separated integers representing Alex's altitude records. The third line contains \( M \) space-separated integers representing Jamie's altitude records.
outputFormat
Output a single line with the winner's name and the maximum altitude change value. If the maximum differences are the same for both, output "Tie" followed by the change value.
## sample5
1 3 7 4 2
1 6 2 8 3
Jamie 6