CF601B Lipshitz Sequence

Description

A function ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF601B/430ebcefe96c88310ccd261882b0ff945145df52.png) is called Lipschitz continuous if there is a real constant $ K $ such that the inequality $ |f(x)-f(y)|=2 $ , ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF601B/02820989bea357555f19945647d60c22d98153a5.png) over all $ 1

Input Format

N/A

Output Format

N/A

Explanation/Hint

In the first query of the first sample, the Lipschitz constants of subarrays of ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF601B/6f9417fdcb9c3ca8d78dd9307c5187f8fb187e89.png) with length at least $ 2 $ are: - ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF601B/ad0807635c6133e89feb982a2e00b9c60b15e05e.png) - ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF601B/b5fd24d5adf442c68d175bf047b1975f7d5e9c25.png) - ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF601B/bb2421b16fa9a9eeeb4115e7a2a3b1e115becb80.png) The answer to the query is their sum.