303412: CF661D. Maximal Difference
Memory Limit:64 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
D. Maximal Differencetime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output
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)).
InputThe 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!
OutputOutput a single integer — the largest absolute value of difference between adjacent elements of the array.
ExamplesInput2 10 4 8 6 12Output
8Input
3 3Output
0