Preparando MOJI

Maximal Difference

2000ms 65536K

Description:

You are given an array of integers ai. Find the largest absolute value of difference between adjacent elements of the array max(abs(ai - ai + 1)).

Input:

The only line of the input contains a list of space-separated integers ai (1 ≤ ai ≤ 100) — elements of the array. The size of the array is between 2 and 10, inclusive. Note that the size of the array is not given explicitly!

Output:

Output a single integer — the largest absolute value of difference between adjacent elements of the array.

Sample Input:

2 10 4 8 6 12

Sample Output:

8

Sample Input:

3 3

Sample Output:

0

Informação

Codeforces

Provedor Codeforces

Código CF661D

Tags

*special

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 09:05:55

Relacionados

Nada ainda