Consecutive differences - MarisaOJ: Marisa Online Judge

Consecutive differences

Time limit: 1000 ms
Memory limit: 256 MB
Given an array $A$ with $n$ integer elements, find the largest difference between two consecutive elements in the array. ### Input - The first line contains an integer $n$. - The second line contains $n$ integers $A_i$. ### Output - Print the maximum difference between two consecutive elements in the array. ### Constraints - $2 \le n \le 1000$. - $1 \le A_i \le 1000$. ### Sample Input: ``` 6 1 7 5 4 10 1 ``` Output: ``` 9 ```