Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …

~/algor $ cat problems/minmax/largest-difference-of-neighbours

Largest difference of neighbours

Author Iqbolshoh Ilhomjonov 3 @iqbolshoh 650 problems
Easy 1000 ms 128 MB 32%
Share

A positive integer and integers are given. Find the largest value of the absolute difference of adjacent elements ().

Choosing the largest of the differences of adjacent elements

Input

The first line contains a positive integer . The next line contains integers .

Output

One integer.

Note


Examples

Input #1
5
4 9 7 1 6
Output #1
6
Input #2
2
-3 -3
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.