CF601B Lipshitz Sequence
Description
A function  is called Lipschitz continuous if there is a real constant $ K $ such that the inequality $ |f(x)-f(y)|=2 $ ,  over all $ 1
Input Format
The first line of the input contains two space-separated integers $ n $ and $ q $ ( $ 2
Output Format
Print the answers to all queries in the order in which they are given in the input. For the $ i $ -th query, print one line containing a single integer — the sum of Lipschitz constants of all subarrays of .
Explanation/Hint
In the first query of the first sample, the Lipschitz constants of subarrays of  with length at least $ 2 $ are:
- 
- 
- 
The answer to the query is their sum.