CF601B Lipshitz Sequence

题目描述

**【题目翻译】** 对于一个序列 $v_{1...n}$,当 $1\leq x

输入格式

输出格式

说明/提示

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.