~/algor $ cat problems/minmax-26-qoshnilar-farqi-eng-kattasi
Largest difference of neighbours
Easy
1000 ms
128 MB
32%
A positive integer $N$ and $N$ integers are given. Find the largest value of the absolute difference of adjacent elements $|A_{i + 1} - A_{i}|$ ($1 \le i \lt N$).
Input
The first line contains a positive integer $N$. The next line contains $N$ integers $A_{i}$.
Output
One integer.
Note
$2 \le N \le 1000$
$-10^{9} \le A_{i} \le 10^{9}$
Examples
Input #1
5 4 9 7 1 6
Output #1
6
Input #2
2 -3 -3
Output #2
0