1213: 跳石头(本题样例点太少,转战洛谷2678)

文件提交:无需freopen 内存限制:128 MB 时间限制:1.000 S
评测方式:普通裁判 命题人:
提交:1 解决:1

题目描述

一年一度的“跳石头”比赛又要开始了!

这项比赛将在一条笔直的河道中进行,河道中分布着一些巨大岩石。组委会已经选择好了两块岩石作为比赛起点和终点。在起点和终点之间,有 lns="http://www.w3.org/1998/Math/MathML"> 块岩石(不含起点和终点的岩石)。在比赛过程中,选手们将从起点出发,每一步跳向相邻的岩石,直至到达终点。

为了提高比赛难度,组委会计划移走一些岩石,使得选手们在比赛过程中的最短跳跃距离尽可能长。由于预算限制,组委会至多从起点和终点之间移走 lns="http://www.w3.org/1998/Math/MathML">

 块岩石(不能移走起点和终点的岩石)。


输入

第一行包含三个整数 

lns="http://www.w3.org/1998/Math/MathML">,,,分别表示起点到终点的距离,起点和终点之间的岩石数,以及组委会至多移走的岩石数。保证 lns="http://www.w3.org/1998/Math/MathML">1 且 lns="http://www.w3.org/1998/Math/MathML">0

接下来 lns="http://www.w3.org/1998/Math/MathML"> 行,每行一个整数,第 lns="http://www.w3.org/1998/Math/MathML"> 行的整数 lns="http://www.w3.org/1998/Math/MathML">(0<<), 表示第 lns="http://www.w3.org/1998/Math/MathML">

 块岩石与起点的距离。这些岩石按与起点距离从小到大的顺序给出,且不会有两个岩石出现在同一个位置。

输出

一个整数,即最短跳跃距离的最大值。

样例输入

25 5 2 
2
11
14
17 
21

样例输出

4

提示

输入输出样例 1 说明

将与起点距离为 lns="http://www.w3.org/1998/Math/MathML">2和 lns="http://www.w3.org/1998/Math/MathML">14 的两个岩石移走后,最短的跳跃距离为 lns="http://www.w3.org/1998/Math/MathML">4(从与起点距离 lns="http://www.w3.org/1998/Math/MathML">17 的岩石跳到距离 lns="http://www.w3.org/1998/Math/MathML">21 的岩石,或者从距离 lns="http://www.w3.org/1998/Math/MathML">21 的岩石跳到终点)。

数据规模与约定

对于 lns="http://www.w3.org/1998/Math/MathML">20%的数据,lns="http://www.w3.org/1998/Math/MathML">010
对于 lns="http://www.w3.org/1998/Math/MathML">50% 的数据,lns="http://www.w3.org/1998/Math/MathML">0100
对于 lns="http://www.w3.org/1998/Math/MathML">100%的数据,lns="http://www.w3.org/1998/Math/MathML">050000,1109