CF385A Bear and Raspberry

题目描述

给定一个序列,请求出相邻两个数之间(前数$-$后数)差的最大值与$c$的差。 如果结果小于$0$的话就输出$0$。

输入格式

第一行输入$n$和$c$。 接下来一行$n$个数字,描述整个序列。

输出格式

输出一行表示结果。

说明/提示

In the first sample the bear will lend a honey barrel at day 3 and then sell it for 7. Then the bear will buy a barrel for 3 and return it to the friend. So, the profit is (7 - 3 - 1) = 3. In the second sample bear will lend a honey barrel at day 1 and then sell it for 100. Then the bear buy the barrel for 1 at the day 2. So, the profit is (100 - 1 - 2) = 97.